提交 ef5ec7f0 编写于 作者: C Colin Ian King 提交者: Greg Kroah-Hartman

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: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NPeter Chen <peter.chen@nxp.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 baa42a35
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册