diff mbox series

[2/5] backlight: led_bl: drop useless NULL initialization

Message ID 20200417113312.24340-2-tomi.valkeinen@ti.com (mailing list archive)
State New, archived
Headers show
Series [1/5] backlight: led_bl: fix cosmetic issues | expand

Commit Message

Tomi Valkeinen April 17, 2020, 11:33 a.m. UTC
There's no need to set 'levels' to NULL.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/backlight/led_bl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Thompson April 20, 2020, 3:29 p.m. UTC | #1
On Fri, Apr 17, 2020 at 02:33:09PM +0300, Tomi Valkeinen wrote:
> There's no need to set 'levels' to NULL.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>


> ---
>  drivers/video/backlight/led_bl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
> index d4e1ce684366..c46ecdfe8b0a 100644
> --- a/drivers/video/backlight/led_bl.c
> +++ b/drivers/video/backlight/led_bl.c
> @@ -140,7 +140,7 @@ static int led_bl_parse_levels(struct device *dev,
>  	if (num_levels > 1) {
>  		int i;
>  		unsigned int db;
> -		u32 *levels = NULL;
> +		u32 *levels;
>  
>  		levels = devm_kzalloc(dev, sizeof(u32) * num_levels,
>  				      GFP_KERNEL);
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>
diff mbox series

Patch

diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
index d4e1ce684366..c46ecdfe8b0a 100644
--- a/drivers/video/backlight/led_bl.c
+++ b/drivers/video/backlight/led_bl.c
@@ -140,7 +140,7 @@  static int led_bl_parse_levels(struct device *dev,
 	if (num_levels > 1) {
 		int i;
 		unsigned int db;
-		u32 *levels = NULL;
+		u32 *levels;
 
 		levels = devm_kzalloc(dev, sizeof(u32) * num_levels,
 				      GFP_KERNEL);