mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 04:34:22 +08:00
drivers: rtc: fix null pointer access in armada38x_rtc_reset
Replace null pointer by pointer to device registers when calling armada38x_rtc_write. Signed-off-by: Francois Berder <fberder@outlook.fr> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
1fd54253bc
commit
2454de2c34
@ -121,7 +121,7 @@ static int armada38x_rtc_reset(struct udevice *dev)
|
||||
armada38x_rtc_write(0, rtc, RTC_CONF_TEST);
|
||||
mdelay(500);
|
||||
armada38x_rtc_write(0, rtc, RTC_TIME);
|
||||
armada38x_rtc_write(BIT(0) | BIT(1), 0, RTC_STATUS);
|
||||
armada38x_rtc_write(BIT(0) | BIT(1), rtc, RTC_STATUS);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user