drm/radeon: remove null test before kfree
authorFabian Frederick <fabf@skynet.be>
Fri, 4 Jul 2014 19:37:09 +0000 (21:37 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Aug 2014 12:53:24 +0000 (08:53 -0400)
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_pm.c

index e447e390d09a148ca7f46d11c757ebbacc3cff4d..a06afee460bed81b582ebe4f3fbd7769d7cde14b 100644 (file)
@@ -1400,9 +1400,7 @@ static void radeon_pm_fini_old(struct radeon_device *rdev)
        }
 
        radeon_hwmon_fini(rdev);
-
-       if (rdev->pm.power_state)
-               kfree(rdev->pm.power_state);
+       kfree(rdev->pm.power_state);
 }
 
 static void radeon_pm_fini_dpm(struct radeon_device *rdev)
@@ -1421,9 +1419,7 @@ static void radeon_pm_fini_dpm(struct radeon_device *rdev)
        radeon_dpm_fini(rdev);
 
        radeon_hwmon_fini(rdev);
-
-       if (rdev->pm.power_state)
-               kfree(rdev->pm.power_state);
+       kfree(rdev->pm.power_state);
 }
 
 void radeon_pm_fini(struct radeon_device *rdev)