]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
Staging: w35und: fix usb_control_msg() error handling in wb35_probe()
authorPekka Enberg <penberg@cs.helsinki.fi>
Fri, 30 Jan 2009 09:32:47 +0000 (11:32 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Feb 2009 20:56:24 +0000 (12:56 -0800)
commitacfa5110b83b171ec509eaf2d1a9e93a5f4709bd
tree8f132828fd627a5bc25b26f42f8cb8281606401f
parent05e361cae5e633c2b58967d1444cf6ae56662e5c
Staging: w35und: fix usb_control_msg() error handling in wb35_probe()

If successful, the usb_control_msg() function returns the number of
bytes transferred. Fix up wb35_probe() to only bail out if the function returns
a negative number. Also, fix up ieee80211_alloc_hw() error code to ENOMEM;
otherwise GCC complains that err might be undefined (and is right about that).

Acked-by: Pavel Machek <pavel@suse.cz>
Reported-and-tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/winbond/wbusb.c