Commit fa00e106 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds
Browse files

drivers/rtc/rtc-pcf50633.c: fix use after free in pcf50633_rtc_probe()

"rtc" is freed and then dereferenced on the next line.  This patch fixes
Signed-off-by: default avatarDan Carpenter <>
Acked-by: default avatarAlessandro Zummo <>
Cc: David Brownell <>
Cc: Paul Gortmaker <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 4c4cb1b1
......@@ -292,8 +292,9 @@ static int __devinit pcf50633_rtc_probe(struct platform_device *pdev)
&pcf50633_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc->rtc_dev)) {
int ret = PTR_ERR(rtc->rtc_dev);
return PTR_ERR(rtc->rtc_dev);
return ret;
pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment