From: Ondrej Zary <linux@rainbow-software.org>
To: linux-wireless@vger.kernel.org
Cc: Kumar Amit Mehta <gmate.amit@gmail.com>,
"John W. Linville" <linville@tuxdriver.com>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: [PATCH] [RESEND] orinoco_usb: Fix broken firmware load error checking
Date: Fri, 16 May 2014 20:01:59 +0200 [thread overview]
Message-ID: <201405162001.59695.linux@rainbow-software.org> (raw)
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
next reply other threads:[~2014-05-16 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 18:01 Ondrej Zary [this message]
2014-05-16 18:10 ` [PATCH] [RESEND] orinoco_usb: Fix broken firmware load error checking John W. Linville
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201405162001.59695.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=gmate.amit@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.