From 93c76c9c1dd3de4a3d4ecbd494085c45fce20414 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Tue, 11 Mar 2014 12:19:06 +0900 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed