]> git.baikalelectronics.ru Git - kernel.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)
commit4aebfed709ac6af7fe463686b4261e346ba587e2
tree8f132828fd627a5bc25b26f42f8cb8281606401f
parent923a1cb695ce847071c38549577e9fd39328c741
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