staging: rtl8712: Fix alignment checks with flipped condition

Fixed two CHECKs of Alignment should match open parenthesis and flipped
a condition to pull the code in one tab.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ngo Tak Fong <simon.fodin@gmail.com>
Link: https://lore.kernel.org/r/20211207212223.GA70594@simon-desktop
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ngo Tak Fong
2021-12-08 05:22:23 +08:00
committed by Greg Kroah-Hartman
parent 673cd3f471
commit d0df53d36c

View File

@ -298,25 +298,23 @@ static u8 fix_header(struct _adapter *adapter, u8 header, u16 header_addr)
continue; continue;
} }
for (i = 0; i < PGPKG_MAX_WORDS; i++) { for (i = 0; i < PGPKG_MAX_WORDS; i++) {
if (BIT(i) & word_en) { if (!(BIT(i) & word_en))
if (BIT(i) & pkt.word_en) { continue;
if (efuse_one_byte_read( if (BIT(i) & pkt.word_en) {
adapter, addr, if (efuse_one_byte_read(adapter,
addr,
&value)) &value))
pkt.data[i * 2] = value; pkt.data[i * 2] = value;
else else
return false; return false;
if (efuse_one_byte_read( if (efuse_one_byte_read(adapter,
adapter,
addr + 1, addr + 1,
&value)) &value))
pkt.data[i * 2 + 1] = pkt.data[i * 2 + 1] = value;
value; else
else return false;
return false;
}
addr += 2;
} }
addr += 2;
} }
} }
if (addr != header_addr) if (addr != header_addr)