Commit 32a39dd4 authored by Jakub Sitnicki's avatar Jakub Sitnicki Committed by Kalle Valo

rtl8xxxu: Skip disabled efuse words early

Avoid a negative conditional and an extra level of indentation in the
bigger part of the loop body.
Signed-off-by: default avatarJakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent f6c47702
......@@ -2454,22 +2454,20 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv *priv)
}
for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
/* Check word enable condition in the section */
if (!(word_mask & BIT(i))) {
ret = rtl8xxxu_read_efuse8(priv,
efuse_addr++,
&val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
ret = rtl8xxxu_read_efuse8(priv,
efuse_addr++,
&val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
} else
if (word_mask & BIT(i)) {
map_addr += 2;
continue;
}
ret = rtl8xxxu_read_efuse8(priv, efuse_addr++, &val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
ret = rtl8xxxu_read_efuse8(priv, efuse_addr++, &val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment