summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2014-03-11 12:19:06 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-17 14:37:46 -0700
commit93c76c9c1dd3de4a3d4ecbd494085c45fce20414 (patch)
tree8c8b828f61aba48335cd9afbd12c628b93d13f15 /tools/perf/scripts/python/bin
parentc0c31b9b2a65c7d8f28f94577cbd234764f3cdcc (diff)
staging: dgnc: replace unnecessary while() with if()
It doesn't need to use while loop for getting newrate, because it always breaks out the end of while loop with "break". So just replace while with if. And the type of newrate is "unsigned int", this type is never less than zero. If it can be set to negative value by user application with ioctl(), it is not zero but it can be a unexpected value for setting custom baudrate. Also smatch says: drivers/staging/dgnc/dgnc_tty.c:967 dgnc_set_custom_speed() warn: unsigned 'newrate' is never less than zero. drivers/staging/dgnc/dgnc_tty.c:981 dgnc_set_custom_speed() info: ignoring unreachable code. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions