]> Git Repo - linux.git/commit
rtc: max8925: Call dev_set_drvdata before rtc_device_register
authorZhangfei Gao <[email protected]>
Wed, 27 Apr 2011 18:44:29 +0000 (11:44 -0700)
committerThomas Gleixner <[email protected]>
Thu, 28 Apr 2011 09:16:21 +0000 (11:16 +0200)
commitf945a3d9600633de589ce698233b34ff6ad57e55
tree61032ef1fe4917f1a505d9a3ea517b1bc54ee502
parente8dad69408a9812d6bb42d03e74d2c314534a4fa
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: Zhangfei Gao <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Link: http://lkml.kernel.org/r/%3C1303929869-25249-1-git-send-email-john.stultz%40linaro.org%3E
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
drivers/rtc/rtc-max8925.c
This page took 0.048049 seconds and 4 git commands to generate.