projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c93a3ae
)
rtc: verify a critical argument to rtc_update_irq() before using it
author
Alessandro Zummo
<
[email protected]
>
Thu, 3 Apr 2014 21:50:09 +0000
(14:50 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 3 Apr 2014 23:21:22 +0000
(16:21 -0700)
This small addition to the core simplifies code in the drivers and makes
them more robust when handling shared IRQs.
Signed-off-by: Alessandro Zummo <
[email protected]
>
Cc: Alexander Shiyan <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/interface.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/interface.c
b/drivers/rtc/interface.c
index 544be722937cb5676c604ee1f586d289df09611c..c2eff6082363a8a4629b4d2a748c002a608b21e0 100644
(file)
--- a/
drivers/rtc/interface.c
+++ b/
drivers/rtc/interface.c
@@
-584,6
+584,9
@@
enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer)
void rtc_update_irq(struct rtc_device *rtc,
unsigned long num, unsigned long events)
{
+ if (unlikely(IS_ERR_OR_NULL(rtc)))
+ return;
+
pm_stay_awake(rtc->dev.parent);
schedule_work(&rtc->irqwork);
}