Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131900
b: refs/heads/master
c: acfa511
h: refs/heads/master
v: v3
  • Loading branch information
Pekka Enberg authored and Greg Kroah-Hartman committed Feb 27, 2009
1 parent be7cf4e commit 2636f49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05e361cae5e633c2b58967d1444cf6ae56662e5c
refs/heads/master: acfa5110b83b171ec509eaf2d1a9e93a5f4709bd
16 changes: 10 additions & 6 deletions trunk/drivers/staging/winbond/wbusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,18 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
struct usb_device *udev = interface_to_usbdev(intf);
struct wbsoft_priv *priv;
struct ieee80211_hw *dev;
int err;
int nr, err;

usb_get_dev(udev);

// 20060630.2 Check the device if it already be opened
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 (err)
nr = 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;
goto error;
}

ltmp = cpu_to_le32(ltmp);
if (ltmp) { // Is already initialized?
Expand All @@ -337,8 +339,10 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
}

dev = ieee80211_alloc_hw(sizeof(*priv), &wbsoft_ops);
if (!dev)
if (!dev) {
err = -ENOMEM;
goto error;
}

priv = dev->priv;

Expand Down

0 comments on commit 2636f49

Please sign in to comment.