Skip to content
Commit 9f7d7a1d authored by Thierry Reding's avatar Thierry Reding Committed by Linus Torvalds
Browse files

drivers/rtc/rtc-tps65910.c: fix potential NULL-pointer dereference



The interrupt handler gets the driver data associated with the RTC
device and doesn't check it for validity.  This can cause a NULL pointer
being dereferenced when and interrupt fires before the driver data was
properly set up.

Fix this by setting the driver data earlier (before the interrupt is
requested).

Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e1d60093
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