mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
rtc: s3c: initialize s3c_rtc_cpu_type before using it
Make sure s3c_rtc_cpu_type is initialised _before_ it's used in an if() check. Reported-by: Jiri Pinkava <[email protected]> Signed-off-by: Maurus Cuelenaere <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Maurus Cuelenaere <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e893de59a4
commit
eaa6e4dd4b
1 changed files with 2 additions and 2 deletions
|
|
@ -508,13 +508,13 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
|
|||
goto err_nortc;
|
||||
}
|
||||
|
||||
s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data;
|
||||
|
||||
if (s3c_rtc_cpu_type == TYPE_S3C64XX)
|
||||
rtc->max_user_freq = 32768;
|
||||
else
|
||||
rtc->max_user_freq = 128;
|
||||
|
||||
s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data;
|
||||
|
||||
platform_set_drvdata(pdev, rtc);
|
||||
|
||||
s3c_rtc_setfreq(&pdev->dev, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue