Skip to content
Commit f945a3d9 authored by Zhangfei Gao's avatar Zhangfei Gao Committed by Thomas Gleixner
Browse files

rtc: max8925: Call dev_set_drvdata before rtc_device_register



We call rtc_read_alarm from rtc_device_register, so it is important
that the rtc device is fully initialized prior to registration.

rtc-max8925 sets drvdata after register, so the rtc_read_alarm code
dereferences a NULL pointer.

Call dev_set_drvdata before rtc_device_register.

[ jstultz/tglx: Massaged commit message ]

Signed-off-by: default avatarZhangfei Gao <zhangfei.gao@marvell.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Link: http://lkml.kernel.org/r/%3C1303929869-25249-1-git-send-email-john.stultz%40linaro.org%3E


Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e8dad694
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment