Skip to contentSkip to conversation

backlight: PTR_ERR return of wrong pointer in cr_backlight_probe()

PATCH New Roel Kluin 1 participant 1 message Dec 7, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 backlight: PTR_ERR return of wrong pointer in cr_backlight_probe()

Return the PTR_ERR of the correct pointer.

---
 drivers/video/backlight/cr_bllcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/cr_bllcd.c +1 -1
index b9fe62b..c2d1e25 100644
@@ -201,7 +201,7 @@ static int cr_backlight_probe(struct platform_device *pdev)
 	if (IS_ERR(ldp)) {
 		backlight_device_unregister(bdp);
 		pci_dev_put(lpc_dev);
-		return PTR_ERR(bdp);
+		return PTR_ERR(ldp);
 	}
 
 	pci_read_config_dword(lpc_dev, CRVML_REG_GPIOBAR,