From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753299AbbGAIGb (ORCPT ); Wed, 1 Jul 2015 04:06:31 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:36818 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbbGAIGQ (ORCPT ); Wed, 1 Jul 2015 04:06:16 -0400 Date: Wed, 1 Jul 2015 09:06:12 +0100 From: Lee Jones To: SF Markus Elfring Cc: Bryan Wu , Jean-Christophe Plagniol-Villard , Jingoo Han , Tomi Valkeinen , linux-fbdev@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: [PATCH v2] backlight: lp8788: Deletion of a check before backlight_device_unregister() Message-ID: <20150701080612.GG3210@x1> References: <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <54720DEB.4060109@users.sourceforge.net> <20141124101006.GD4241@x1> <5473736F.8070705@users.sourceforge.net> <558FE386.7060704@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <558FE386.7060704@users.sourceforge.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 28 Jun 2015, SF Markus Elfring wrote: > > From: Markus Elfring > > > > 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 > > --- > > drivers/video/backlight/lp8788_bl.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c > > index d6c4f6a..24a055c 100644 > > --- a/drivers/video/backlight/lp8788_bl.c > > +++ b/drivers/video/backlight/lp8788_bl.c > > @@ -221,8 +221,7 @@ static void lp8788_backlight_unregister(struct lp8788_bl *bl) > > { > > struct backlight_device *bl_dev = bl->bl_dev; > > > > - if (bl_dev) > > - backlight_device_unregister(bl_dev); > > + backlight_device_unregister(bl_dev); > > } > > > > static ssize_t lp8788_get_bl_ctl_mode(struct device *dev, > > > > Would you like to integrate this update suggestion > into another source code repository? If this patch has not received any attention in some time, it's possible that it may have slipped through the gaps. Please re-submit the set. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog