drm/radeon: remove some dead code
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Feb 2017 13:16:04 +0000 (16:16 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Feb 2017 02:04:29 +0000 (21:04 -0500)
If "rdev->bios" is NULL then we don't need to free it.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_bios.c

index 00cfb5d2875fd16f3038ca87e2d49d554905020f..04c0ed41374f1ada033278e168b99b08ab643521 100644 (file)
@@ -638,10 +638,8 @@ static bool radeon_acpi_vfct_bios(struct radeon_device *rdev)
                                             vhdr->ImageLength,
                                             GFP_KERNEL);
 
-                       if (!rdev->bios) {
-                               kfree(rdev->bios);
+                       if (!rdev->bios)
                                return false;
-                       }
                        return true;
                }
        }