Home
last modified time | relevance | path

Searched hist:a91d2bab355f3a5caa767d7316f80422bfcd2ad6 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/rtc/
H A Drtc-stmp3xxx.cdiff a91d2bab355f3a5caa767d7316f80422bfcd2ad6 Wed May 25 05:56:51 CDT 2011 Wolfram Sang <w.sang@pengutronix.de> rtc: stmp3xxx: Initialize drvdata before registering device

Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
an issue in a number of RTC drivers, where the drivers call
rtc_device_register before initializing the device or platform drvdata.

This frequently results in null pointer dereferences when the
rtc_device_register immediately makes use of the rtc device, calling
rtc_read_alarm.

The solution is to ensure the drvdata is initialized prior to registering
the rtc device.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>