aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2012-07-14 03:40:37 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 22:21:37 -0400
commit6594ac5dead7ad7cd10103d147eda3190fd49cad (patch)
tree010d1d0684d58599669d818eb1044dbea3ebfbe8
parent2390e83439f533cf2eaf506087e4efb6cf92d91f (diff)
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@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/winbond/wbusb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c3751a718384..ef360547ecec 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,
747 struct usb_host_interface *interface; 747 struct usb_host_interface *interface;
748 struct ieee80211_hw *dev; 748 struct ieee80211_hw *dev;
749 struct wbsoft_priv *priv; 749 struct wbsoft_priv *priv;
750 int nr, err; 750 int err;
751 u32 ltmp; 751 u32 ltmp;
752 752
753 usb_get_dev(udev); 753 usb_get_dev(udev);
754 754
755 /* Check the device if it already be opened */ 755 /* Check the device if it already be opened */
756 nr = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 756 err = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
757 0x01, 757 0x01,
758 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 758 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
759 0x0, 0x400, &ltmp, 4, HZ * 100); 759 0x0, 0x400, &ltmp, 4, HZ * 100);
760 if (nr < 0) { 760 if (err < 0)
761 err = nr;
762 goto error; 761 goto error;
763 }
764 762
765 /* Is already initialized? */ 763 /* Is already initialized? */
766 ltmp = cpu_to_le32(ltmp); 764 ltmp = cpu_to_le32(ltmp);