From: Colin Ian King Date: Sun, 12 Feb 2017 18:35:18 +0000 (+0000) Subject: usb: misc: usbtest: remove redundant check on retval < 0 X-Git-Tag: v5.15~11844^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef5ec7f08d6750b4786efe8dc76184fd86f85d4c;p=platform%2Fkernel%2Flinux-starfive.git usb: misc: usbtest: remove redundant check on retval < 0 The check for retval being less than zero is always true since retval equal to -EPIPE at that point. Replace the existing conditional with just return retval. Detected with CoverityScan, CID#114349 ("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Peter Chen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 3525626..17c0810 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -992,7 +992,7 @@ static int ch9_postconfig(struct usbtest_dev *dev) dev_err(&iface->dev, "hs dev qualifier --> %d\n", retval); - return (retval < 0) ? retval : -EDOM; + return retval; } /* usb2.0 but not high-speed capable; fine */ } else if (retval != sizeof(struct usb_qualifier_descriptor)) {