[PATCH 1/1] drm/omap: remove null test before kfree
David Herrmann
dh.herrmann at gmail.com
Sun Jul 6 03:55:35 PDT 2014
Hi
On Fri, Jul 4, 2014 at 9:17 PM, Fabian Frederick <fabf at skynet.be> wrote:
> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required
>
> Cc: David Airlie <airlied at linux.ie>
> Cc: David Herrmann <dh.herrmann at gmail.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Cc: dri-devel at lists.freedesktop.org
> Signed-off-by: Fabian Frederick <fabf at skynet.be>
Reviewed-by: David Herrmann <dh.herrmann at gmail.com>
Thanks
David
> ---
> drivers/gpu/drm/omapdrm/omap_gem.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
> index 95dbce2..be0c2e8 100644
> --- a/drivers/gpu/drm/omapdrm/omap_gem.c
> +++ b/drivers/gpu/drm/omapdrm/omap_gem.c
> @@ -1183,9 +1183,7 @@ int omap_gem_op_sync(struct drm_gem_object *obj, enum omap_gem_op op)
> }
> }
> spin_unlock(&sync_lock);
> -
> - if (waiter)
> - kfree(waiter);
> + kfree(waiter);
> }
> return ret;
> }
> --
> 1.9.1
>
More information about the dri-devel
mailing list