提交 6594ac5d 编写于 作者: D Devendra Naga 提交者: Greg Kroah-Hartman

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: NDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2390e834
......@@ -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, &ltmp, 4, HZ * 100);
if (nr < 0) {
err = nr;
if (err < 0)
goto error;
}
/* Is already initialized? */
ltmp = cpu_to_le32(ltmp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册