aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-06-11 13:43:55 +0200
committerAlexander Couzens <lynxis@fe80.eu>2017-06-11 14:22:44 +0200
commitab116180016dff282e5ad8104b859cc2bca3d5e0 (patch)
tree9b88fa53238c4754c07b58f1eeda2442468cafa7 /target
parent878cd7702620be91175f2568f3a8225150483b0c (diff)
downloadupstream-ab116180016dff282e5ad8104b859cc2bca3d5e0.tar.gz
upstream-ab116180016dff282e5ad8104b859cc2bca3d5e0.tar.bz2
upstream-ab116180016dff282e5ad8104b859cc2bca3d5e0.zip
ar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)
Found-by: Coverity Scan #1330474 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch b/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch
index 6778183f78..fa5681b746 100644
--- a/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch
+++ b/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch
@@ -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)