ar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)

Found-by: Coverity Scan #1330474
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
owl
Alexander Couzens 2017-06-11 13:43:55 +02:00
parent 878cd77026
commit ab11618001
1 changed files with 2 additions and 2 deletions

View File

@ -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)