diff options
author | Navya Sri Nizamkari <navyasri.tech@gmail.com> | 2015-02-28 02:06:44 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-01 16:22:52 -0800 |
commit | 25034ff83c25c8d1a114e3219fbf6c7b5a006622 (patch) | |
tree | 910c3f001a36648ec1993b81c73156cb3121b676 /drivers/staging/rtl8188eu/os_dep | |
parent | 3fe90658016577b1aee33dd183cd1098792cebd9 (diff) | |
download | op-kernel-dev-25034ff83c25c8d1a114e3219fbf6c7b5a006622.zip op-kernel-dev-25034ff83c25c8d1a114e3219fbf6c7b5a006622.tar.gz |
staging: rtl8188eu: Compress two statements into one.
This patch removes the use of a variable used only for
returning a value. The following coccinelle script was
used to discover it:
@@
expression ret;
identifier f;
@@
-ret =
+return
f(...);
-return ret;
It also fixes the checkpatch.pl warning about line being over
80 characters, in the lines where changes were made.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 80e7ef9..b9e1a61 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -552,7 +552,6 @@ int usb_write8(struct adapter *adapter, u32 addr, u8 val) u16 index; u16 len; u8 data; - int ret; request = 0x05; requesttype = 0x00;/* write_out */ @@ -560,8 +559,8 @@ int usb_write8(struct adapter *adapter, u32 addr, u8 val) wvalue = (u16)(addr&0x0000ffff); len = 1; data = val; - ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype); - return ret; + return usbctrl_vendorreq(adapter, request, wvalue, + index, &data, len, requesttype); } int usb_write16(struct adapter *adapter, u32 addr, u16 val) @@ -572,7 +571,6 @@ int usb_write16(struct adapter *adapter, u32 addr, u16 val) u16 index; u16 len; __le32 data; - int ret; request = 0x05; @@ -584,10 +582,10 @@ int usb_write16(struct adapter *adapter, u32 addr, u16 val) data = cpu_to_le32(val & 0x0000ffff); - ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype); + return usbctrl_vendorreq(adapter, request, wvalue, + index, &data, len, requesttype); - return ret; } int usb_write32(struct adapter *adapter, u32 addr, u32 val) @@ -598,7 +596,6 @@ int usb_write32(struct adapter *adapter, u32 addr, u32 val) u16 index; u16 len; __le32 data; - int ret; request = 0x05; @@ -609,10 +606,10 @@ int usb_write32(struct adapter *adapter, u32 addr, u32 val) len = 4; data = cpu_to_le32(val); - ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype); + return usbctrl_vendorreq(adapter, request, wvalue, + index, &data, len, requesttype); - return ret; } static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) |