Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -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 (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);
			ret = rtl8xxxu_read_efuse8(priv, efuse_addr++, &val8);
			if (ret)
				goto exit;
			priv->efuse_wifi.raw[map_addr++] = val8;
			} else
				map_addr += 2;
		}
	}