On Sun, Feb 12, 2017 at 06:35:18PM +0000, Colin King wrote: > From: Colin Ian King <colin.king@xxxxxxxxxxxxx> > > 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 <colin.king@xxxxxxxxxxxxx> > --- > drivers/usb/misc/usbtest.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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)) { Reviewed-by: Peter Chen <peter.chen@xxxxxxx> -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html