[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20121108122724.d602a134.akpm@linux-foundation.org>
Date: Thu, 8 Nov 2012 12:27:24 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: "G.Shark Jeong" <gshark.jeong@...il.com>
Cc: Richard Purdie <rpurdie@...ys.net>,
Daniel Jeong <daniel.jeong@...com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]backlight: lm3639: fix coccinelle warning.
On Thu, 8 Nov 2012 15:44:49 +0900
"G.Shark Jeong" <gshark.jeong@...il.com> wrote:
> From: "G.Shark Jeong" <gshark.jeong@...il.com>
>
> Fix coccinelle warning.
Please always quote the warning or error message text in the changelog
when fixing an error or warning.
> diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c
> index 585949b..868a9da 100644
> --- a/drivers/video/backlight/lm3639_bl.c
> +++ b/drivers/video/backlight/lm3639_bl.c
> @@ -403,9 +403,9 @@ static int __devexit lm3639_remove(struct i2c_client *client)
>
> regmap_write(pchip->regmap, REG_ENABLE, 0x00);
>
> - if (&pchip->cdev_torch)
> + if ((&pchip->cdev_torch)!=NULL)
> led_classdev_unregister(&pchip->cdev_torch);
> - if (&pchip->cdev_flash)
> + if ((&pchip->cdev_flash)!=NULL)
Please use scripts/checkpatch.pl.
This code is just pointless. The expression "&anything" will never
evaluate to NULL.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists