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

staging: rtl8712: rtl871x_ioctl_linux.c: Cleaning up useless if statement

The same code regardless of the outcome of the if statement.
And clean up another duplicate line of code.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rickard Strandqvist and committed by
Greg Kroah-Hartman
3ae70746 0c9f3a65

+1 -6
+1 -6
drivers/staging/rtl8712/rtl871x_ioctl_linux.c
··· 1459 1459 RTL8712_RF_2T2R == rf_type) 1460 1460 max_rate = (bw_40MHz) ? ((short_GI) ? 300 : 1461 1461 270) : ((short_GI) ? 144 : 130); 1462 - else if (mcs_rate & 0x0080) /* MCS7 */ 1463 - max_rate = (bw_40MHz) ? ((short_GI) ? 150 : 1464 - 135) : ((short_GI) ? 72 : 65); 1465 1462 else /* default MCS7 */ 1466 1463 max_rate = (bw_40MHz) ? ((short_GI) ? 150 : 1467 1464 135) : ((short_GI) ? 72 : 65); 1468 1465 max_rate *= 2; /* Mbps/2 */ 1469 - wrqu->bitrate.value = max_rate * 500000; 1470 - } else { 1471 - wrqu->bitrate.value = max_rate * 500000; 1472 1466 } 1467 + wrqu->bitrate.value = max_rate * 500000; 1473 1468 } else 1474 1469 return -ENOLINK; 1475 1470 return 0;