summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-11-12 15:10:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 12:09:26 +0900
commit50ccf0455e51eba51e645b3724c8e932c75774b1 (patch)
tree03e552a50e5de17414216da90a55a41b46546992
parent10992435b30eb470e6b91d2415abfb79680d00b6 (diff)
downloadop-kernel-dev-50ccf0455e51eba51e645b3724c8e932c75774b1.zip
op-kernel-dev-50ccf0455e51eba51e645b3724c8e932c75774b1.tar.gz
drivers/rtc/rtc-ds1307.c: release irq on error
'client->irq' was not released on error. Fix it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/rtc/rtc-ds1307.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index ca18fd1..e8ac439 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -956,7 +956,7 @@ read_rtc:
GFP_KERNEL);
if (!ds1307->nvram) {
err = -ENOMEM;
- goto exit;
+ goto err_irq;
}
ds1307->nvram->attr.name = "nvram";
ds1307->nvram->attr.mode = S_IRUGO | S_IWUSR;
@@ -967,13 +967,15 @@ read_rtc:
ds1307->nvram_offset = chip->nvram_offset;
err = sysfs_create_bin_file(&client->dev.kobj, ds1307->nvram);
if (err)
- goto exit;
+ goto err_irq;
set_bit(HAS_NVRAM, &ds1307->flags);
dev_info(&client->dev, "%zu bytes nvram\n", ds1307->nvram->size);
}
return 0;
+err_irq:
+ free_irq(client->irq, client);
exit:
return err;
}
OpenPOWER on IntegriCloud