backlight/ld9040.c: testing the wrong variable in
Subsystems (3)
PATCH 1/1 backlight/ld9040.c: testing the wrong variable in
We should be testing "bd" here instead of "ld". It's a copy and paste bug.
Signed-off-by Dan Carpenter <[email protected]>
drivers/video/backlight/ld9040.c +2 -2
@@ -701,8 +701,8 @@ static int ld9040_probe(struct spi_device *spi) bd =backlight_device_register ("ld9040-bl" , &spi->dev, lcd, &ld9040_backlight_ops,NULL ); -if (IS_ERR (ld)) { - ret =PTR_ERR (ld); +if (IS_ERR (bd)) { + ret =PTR_ERR (bd); goto out_free_lcd; }
Quoted 11 lines · Dan Carpenter
We should be testing "bd" here instead of "ld". It's a copy and paste bug.
Signed-off-by Dan Carpenter <[email protected]>drivers/video/backlight/ld9040.c +0
-0
drivers/video/backlight/ld9040.c static int ld9040_probe(struct spi_device *spi) · line 708
Quoted 10 lines
drivers/video/backlight/ld9040.c +2
-2@@ -701,8 +701,8 @@ static int ld9040_probe(struct spi_device *spi) bd =backlight_device_register ("ld9040-bl" , &spi->dev, lcd, &ld9040_backlight_ops,NULL ); -if (IS_ERR (ld)) { - ret =PTR_ERR (ld); +if (IS_ERR (bd)) { + ret =PTR_ERR (bd); goto out_free_lcd; }
Yes, It's my mistake. It has to be changed as you said.
Thank you,