mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-29 10:02:23 +00:00
ar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)
Found-by: Coverity Scan #1330474 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
parent
878cd77026
commit
ab11618001
@ -111,8 +111,8 @@
|
||||
+
|
||||
+ BUG_ON(!soc_is_ar933x() && !soc_is_ar934x());
|
||||
+ base = ioremap_nocache(AR93XX_WMAC_BASE, AR93XX_WMAC_SIZE);
|
||||
+ while (addr > sizeof(hdr)) {
|
||||
+ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr)))
|
||||
+ while (addr > sizeof(hdr_u32)) {
|
||||
+ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr_u32)))
|
||||
+ break;
|
||||
+
|
||||
+ if (hdr_u32 == 0 || hdr_u32 == ~0)
|
||||
|
Loading…
Reference in New Issue
Block a user