diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-02-12 19:35:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-14 18:32:25 +0100 |
commit | ef5ec7f08d6750b4786efe8dc76184fd86f85d4c (patch) | |
tree | 711aed4d691ac85901d363789f2a5e4e8ac7d82e /drivers/usb/misc/usbtest.c | |
parent | ohci-hub: fix typo in dbg_port macro (diff) | |
download | linux-ef5ec7f08d6750b4786efe8dc76184fd86f85d4c.tar.xz linux-ef5ec7f08d6750b4786efe8dc76184fd86f85d4c.zip |
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 <colin.king@canonical.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 3525626bf086..17c081068257 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)) { |