Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253130
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 08/15] net: wireless: simplify return flow for usb_control_msg |
| Date | 2015-10-21 21:10 +0200 |
| Message-ID | <qm6VQ-3Hx-29@gated-at.bofh.it> (permalink) |
| References | <qm6VP-3Hx-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
remove int ret suggested by Jiri Slaby
This patch is to the at76c50x-usb.c file that fixes up warning
reported by coccicheck:
WARNING: end returns can be simplified if negative or 0 value
Prefer direct return value instead of writing 2-3 more sentence.
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/at76c50x-usb.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index dab2513..b4aa062 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -543,14 +543,10 @@ static void at76_ledtrig_tx_activity(void)
static int at76_remap(struct usb_device *udev)
{
- int ret;
- ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
+ return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
USB_TYPE_VENDOR | USB_DIR_OUT |
USB_RECIP_INTERFACE, 0, 0, NULL, 0,
USB_CTRL_GET_TIMEOUT);
- if (ret < 0)
- return ret;
- return 0;
}
static int at76_get_op_mode(struct usb_device *udev)
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate Punit Vara <punitvara@gmail.com> - 2015-10-21 21:10 +0200 [PATCH v2 08/15] net: wireless: simplify return flow for usb_control_msg Punit Vara <punitvara@gmail.com> - 2015-10-21 21:10 +0200 Re: [PATCH v2 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-22 00:10 +0200 Re: [PATCH v2 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate Eliad Peller <eliad@wizery.com> - 2015-10-22 09:00 +0200
csiph-web