summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-08-09 05:27:58 +0800
committerBryan Wu <bryan.wu@canonical.com>2012-08-13 14:34:02 +0800
commit4a5a4184628c529774c1492bc1a21743b69b5fc3 (patch)
treef67f310dc21130660a78cb1c160aa184477e87f4 /drivers/leds
parent86e99d23d0210e8d43a0bb576582a455d907578e (diff)
downloadlinux-4a5a4184628c529774c1492bc1a21743b69b5fc3.tar.gz
linux-4a5a4184628c529774c1492bc1a21743b69b5fc3.tar.bz2
linux-4a5a4184628c529774c1492bc1a21743b69b5fc3.zip
leds: renesas: fix error handling
bfe4c041 "leds: convert Renesas TPU LED driver to devm_kzalloc() and cleanup error exit path" introduced a possible case in which r_tpu_probe calls iounmap on a wild pointer. This changes the one case that was missed in the same way as the other error paths. Without this patch, building kota2_defconfig results in: drivers/leds/leds-renesas-tpu.c: In function 'r_tpu_probe': drivers/leds/leds-renesas-tpu.c:246:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] drivers/leds/leds-renesas-tpu.c:308:17: warning: 'p' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Magnus Damm <damm@opensource.se> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-renesas-tpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-renesas-tpu.c b/drivers/leds/leds-renesas-tpu.c
index 9ee12c28059a..771ea067e680 100644
--- a/drivers/leds/leds-renesas-tpu.c
+++ b/drivers/leds/leds-renesas-tpu.c
@@ -247,7 +247,7 @@ static int __devinit r_tpu_probe(struct platform_device *pdev)
if (!cfg) {
dev_err(&pdev->dev, "missing platform data\n");
- goto err0;
+ return -ENODEV;
}
p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);