Message ID | 1404502629-32229-1-git-send-email-fabf@skynet.be (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jul 4, 2014 at 3:37 PM, Fabian Frederick <fabf@skynet.be> wrote: > 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> Applied. thanks! Alex > --- > drivers/gpu/drm/radeon/radeon_pm.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c > index e447e39..a06afee 100644 > --- a/drivers/gpu/drm/radeon/radeon_pm.c > +++ b/drivers/gpu/drm/radeon/radeon_pm.c > @@ -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) > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index e447e39..a06afee 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -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)
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> --- drivers/gpu/drm/radeon/radeon_pm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)