projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fd5425
)
drivers: rtc: fix null pointer access in armada38x_rtc_reset
author
Francois Berder
<fberder@outlook.fr>
Mon, 28 Feb 2022 09:31:45 +0000
(10:31 +0100)
committer
Stefan Roese
<sr@denx.de>
Fri, 4 Mar 2022 07:38:05 +0000
(08:38 +0100)
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>
drivers/rtc/armada38x.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/armada38x.c
b/drivers/rtc/armada38x.c
index
2d264ac
..
2af64e3
100644
(file)
--- a/
drivers/rtc/armada38x.c
+++ b/
drivers/rtc/armada38x.c
@@
-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;