[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1342251637-16327-1-git-send-email-devendra.aaru@gmail.com>
Date: Sat, 14 Jul 2012 13:25:37 +0545
From: Devendra Naga <devendra.aaru@...il.com>
To: Pavel Machek <pavel@....cz>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
"John W. Linville" <linville@...driver.com>,
Eliad Peller <eliad@...ery.com>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Cc: Devendra Naga <devendra.aaru@...il.com>
Subject: [PATCH] staging/winbond: use err and remove nr
err can be used get return status of the usb_control_msg, rather using
nr and assigning it to err when the function returns error.
Signed-off-by: Devendra Naga <devendra.aaru@...il.com>
---
drivers/staging/winbond/wbusb.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c3751a7..ef36054 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -747,20 +747,18 @@ static int wb35_probe(struct usb_interface *intf,
struct usb_host_interface *interface;
struct ieee80211_hw *dev;
struct wbsoft_priv *priv;
- int nr, err;
+ int err;
u32 ltmp;
usb_get_dev(udev);
/* Check the device if it already be opened */
- nr = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
+ err = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
0x01,
USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
0x0, 0x400, <mp, 4, HZ * 100);
- if (nr < 0) {
- err = nr;
+ if (err < 0)
goto error;
- }
/* Is already initialized? */
ltmp = cpu_to_le32(ltmp);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists