Commit 131c9cc8 authored by Alessandro Zummo's avatar Alessandro Zummo Committed by Linus Torvalds

rtc: verify a critical argument to rtc_update_irq() before using it

This small addition to the core simplifies code in the drivers and makes
them more robust when handling shared IRQs.
Signed-off-by: default avatarAlessandro Zummo <>
Cc: Alexander Shiyan <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent c93a3ae2
......@@ -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)))
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