* [PATCH 1/1] drm/radeon: remove null test before kfree
@ 2014-07-04 19:37 Fabian Frederick
2014-07-07 20:42 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2014-07-04 19:37 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Alex Deucher, David Airlie, dri-devel
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(-)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] drm/radeon: remove null test before kfree
2014-07-04 19:37 [PATCH 1/1] drm/radeon: remove null test before kfree Fabian Frederick
@ 2014-07-07 20:42 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2014-07-07 20:42 UTC (permalink / raw)
To: Fabian Frederick; +Cc: LKML, Alex Deucher, Maling list - DRI developers
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] drm/radeon: remove null test before kfree
@ 2014-07-07 20:42 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2014-07-07 20:42 UTC (permalink / raw)
To: Fabian Frederick; +Cc: Alex Deucher, LKML, Maling list - DRI developers
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-07 20:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-04 19:37 [PATCH 1/1] drm/radeon: remove null test before kfree Fabian Frederick
2014-07-07 20:42 ` Alex Deucher
2014-07-07 20:42 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.