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
1 changed files with 2 additions and 2 deletions
|
@ -111,8 +111,8 @@
|
||||||
+
|
+
|
||||||
+ BUG_ON(!soc_is_ar933x() && !soc_is_ar934x());
|
+ BUG_ON(!soc_is_ar933x() && !soc_is_ar934x());
|
||||||
+ base = ioremap_nocache(AR93XX_WMAC_BASE, AR93XX_WMAC_SIZE);
|
+ base = ioremap_nocache(AR93XX_WMAC_BASE, AR93XX_WMAC_SIZE);
|
||||||
+ while (addr > sizeof(hdr)) {
|
+ while (addr > sizeof(hdr_u32)) {
|
||||||
+ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr)))
|
+ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr_u32)))
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
+ if (hdr_u32 == 0 || hdr_u32 == ~0)
|
+ if (hdr_u32 == 0 || hdr_u32 == ~0)
|
||||||
|
|
Loading…
Reference in a new issue