summaryrefslogtreecommitdiff
path: root/common/usb_storage.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-09-06 22:17:35 +0900
committerTom Rini <trini@konsulko.com>2016-09-23 17:53:48 -0400
commit8319aeb1dad46c4b6d35ea16a5697ff8160dd4d1 (patch)
treedca6d03512e98c730cd7b6851d039e31d4cef84e /common/usb_storage.c
parent4052734273668e5f8fbe6ae8c85dd043514a38eb (diff)
usb: squash lines for immediate return
This makes functions much simpler. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r--common/usb_storage.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 7e6e52d2ec..0345aa22ef 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -708,13 +708,10 @@ static int usb_stor_CBI_get_status(ccb *srb, struct us_data *us)
/* clear a stall on an endpoint - special for BBB devices */
static int usb_stor_BBB_clear_endpt_stall(struct us_data *us, __u8 endpt)
{
- int result;
-
/* ENDPOINT_HALT = 0, so set value to 0 */
- result = usb_control_msg(us->pusb_dev, usb_sndctrlpipe(us->pusb_dev, 0),
- USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT,
- 0, endpt, NULL, 0, USB_CNTL_TIMEOUT * 5);
- return result;
+ return usb_control_msg(us->pusb_dev, usb_sndctrlpipe(us->pusb_dev, 0),
+ USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0,
+ endpt, NULL, 0, USB_CNTL_TIMEOUT * 5);
}
static int usb_stor_BBB_transport(ccb *srb, struct us_data *us)