Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ngo Tak Fong and committed by
Greg Kroah-Hartman
d0df53d3 673cd3f4

+13 -15
+13 -15
drivers/staging/rtl8712/rtl8712_efuse.c
··· 298 298 continue; 299 299 } 300 300 for (i = 0; i < PGPKG_MAX_WORDS; i++) { 301 - if (BIT(i) & word_en) { 302 - if (BIT(i) & pkt.word_en) { 303 - if (efuse_one_byte_read( 304 - adapter, addr, 301 + if (!(BIT(i) & word_en)) 302 + continue; 303 + if (BIT(i) & pkt.word_en) { 304 + if (efuse_one_byte_read(adapter, 305 + addr, 305 306 &value)) 306 - pkt.data[i * 2] = value; 307 - else 308 - return false; 309 - if (efuse_one_byte_read( 310 - adapter, 307 + pkt.data[i * 2] = value; 308 + else 309 + return false; 310 + if (efuse_one_byte_read(adapter, 311 311 addr + 1, 312 312 &value)) 313 - pkt.data[i * 2 + 1] = 314 - value; 315 - else 316 - return false; 317 - } 318 - addr += 2; 313 + pkt.data[i * 2 + 1] = value; 314 + else 315 + return false; 319 316 } 317 + addr += 2; 320 318 } 321 319 } 322 320 if (addr != header_addr)