drm/radeon: remove some dead code
Subsystems (3)
PATCH 1/1 drm/radeon: remove some dead code
If "rdev->bios" is NULL then we don't need to free it.
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/radeon/radeon_bios.c +1 -3
@@ -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; } }
Quoted 9 lines · Dan Carpenter
If "
rdev->bios" is NULL then we don't need to free it.Signed-off-by Dan Carpenter <[email protected]>drivers/gpu/drm/radeon/radeon_bios.c +0
-0
drivers/gpu/drm/radeon/radeon_bios.c static bool radeon_acpi_vfct_bios(struct radeon_device *rdev) · line 643
Quoted 9 lines
drivers/gpu/drm/radeon/radeon_bios.c +1
-3@@ -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;
Could be simplified further to
return rdev->bios != NULL;
or maybe
return !!rdev->bios;
Either way,
Reviewed-by Michel Dänzer <[email protected]>
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
AppliedQuoted 3 lines · Dan Carpenter
If "
rdev->bios" is NULL then we don't need to free it.Signed-off-by Dan Carpenter <[email protected]>
applied. thanks!
Quoted 17 lines
drivers/gpu/drm/radeon/radeon_bios.c +1
-3@@ -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; } }
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx