[patch] backlight/ld9040.c: testing the wrong variable in ld9040_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should be testing "bd" here instead of "ld".  It's a copy and
paste bug.

Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

diff --git a/drivers/video/backlight/ld9040.c b/drivers/video/backlight/ld9040.c
index 7281b25..9e81d69 100644
--- a/drivers/video/backlight/ld9040.c
+++ b/drivers/video/backlight/ld9040.c
@@ -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;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux