From: Navya Sri Nizamkari Date: Fri, 27 Feb 2015 20:36:44 +0000 (+0530) Subject: staging: rtl8188eu: Compress two statements into one. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=25034ff83c25c8d1a114e3219fbf6c7b5a006622;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 80e7ef96d807..b9e1a61f67ca 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)