[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOw6vb+qOiJu4ikMmk8+j0eH+yzA81ynQfuc9FR4B4XKcRUh2w@mail.gmail.com>
Date: Fri, 22 Jul 2016 11:25:49 -0400
From: Sean Paul <seanpaul@...omium.org>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc: dri-devel <dri-devel@...ts.freedesktop.org>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Thierry Reding <treding@...dia.com>,
Julia Lawall <julia.lawall@...6.fr>,
kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/bridge: ps8622: Delete an unnecessary check before backlight_device_unregister()
On Fri, Jul 22, 2016 at 8:54 AM, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Fri, 22 Jul 2016 14:45:51 +0200
>
> The backlight_device_unregister() function tests whether its argument
> is NULL and then returns immediately.
> Thus the test around the call is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
Applied to drm-misc
> ---
> drivers/gpu/drm/bridge/parade-ps8622.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c
> index 5cd8dd7..583b8ce 100644
> --- a/drivers/gpu/drm/bridge/parade-ps8622.c
> +++ b/drivers/gpu/drm/bridge/parade-ps8622.c
> @@ -636,9 +636,7 @@ static int ps8622_remove(struct i2c_client *client)
> {
> struct ps8622_bridge *ps8622 = i2c_get_clientdata(client);
>
> - if (ps8622->bl)
> - backlight_device_unregister(ps8622->bl);
> -
> + backlight_device_unregister(ps8622->bl);
> drm_bridge_remove(&ps8622->bridge);
>
> return 0;
> --
> 2.9.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Powered by blists - more mailing lists