* [PATCH] orinoco_usb: Fix broken firmware load error checking
@ 2014-05-09 16:10 Ondrej Zary
0 siblings, 0 replies; only message in thread
From: Ondrej Zary @ 2014-05-09 16:10 UTC (permalink / raw)
To: linux-wireless
Cc: Kumar Amit Mehta, John W. Linville, Kernel development list
The check of ezusb_firmware_download() return value (added by commit
488ec878034eccb852267b0e27ce9d511f75c587) is broken because
ezusb_firmware_download() returns 1 on success.
This causes the driver not to work with the following error:
orinoco_usb: probe of 3-3:1.0 failed with error -14
Check the return value only for negative values.
This fix should be applied to -stable kernels too.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
drivers/net/wireless/orinoco/orinoco_usb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c
index f9805c9..1cbb783 100644
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -1687,7 +1687,7 @@ static int ezusb_probe(struct usb_interface *interface,
firmware.code = fw_entry->data;
}
if (firmware.size && firmware.code) {
- if (ezusb_firmware_download(upriv, &firmware))
+ if (ezusb_firmware_download(upriv, &firmware) < 0)
goto error;
} else {
err("No firmware to download");
--
Ondrej Zary
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-09 16:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 16:10 [PATCH] orinoco_usb: Fix broken firmware load error checking Ondrej Zary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).