diff options
author | Connor Kuehl <connor.kuehl@canonical.com> | 2019-09-24 07:28:19 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-30 21:58:01 +0200 |
commit | 43821e36e5fcbc5ded28ce80290aff20445bd166 (patch) | |
tree | 17d89e124e8f169f6937ee206c80722fd2d5e0a0 /LICENSES | |
parent | staging: olpc_dcon: fix wrong dependencies in Kconfig file (diff) | |
download | linux-dev-43821e36e5fcbc5ded28ce80290aff20445bd166.tar.xz linux-dev-43821e36e5fcbc5ded28ce80290aff20445bd166.zip |
staging: rtl8188eu: remove dead code/vestigial do..while loop
The local variable 'bcmd_down' is always set to true almost immediately
before the do-while's condition is checked. As a result, !bcmd_down
evaluates to false which short circuits the logical AND operator meaning
that the second operand is never reached and is therefore dead code.
Furthermore, the do..while loop may be removed since it will always only
execute once because 'bcmd_down' is always set to true, so the
!bcmd_down evaluates to false and the loop exits immediately after the
first pass.
Fix this by removing the loop and its condition variables 'bcmd_down'
and 'retry_cnts'
While we're in there, also fix some checkpatch.pl suggestions regarding
spaces around arithmetic operators like '+'
Addresses-Coverity: ("Logically dead code")
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Link: https://lore.kernel.org/r/20190924142819.5243-1-connor.kuehl@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions