All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Ondrej Zary <linux@rainbow-software.org>
Cc: linux-wireless@vger.kernel.org,
	Kumar Amit Mehta <gmate.amit@gmail.com>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RESEND] orinoco_usb: Fix broken firmware load error checking
Date: Fri, 16 May 2014 14:10:55 -0400	[thread overview]
Message-ID: <20140516181054.GF3431@tuxdriver.com> (raw)
In-Reply-To: <201405162001.59695.linux@rainbow-software.org>

This is already merged in wireless-next...

commit fe5d96246e9c4d266c4a8dca99f82ad82f2305b5
Author: Ondrej Zary <linux@rainbow-software.org>
Date:   Fri May 9 18:10:34 2014 +0200

    orinoco_usb: Fix broken firmware load error checking
    
    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>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>

On Fri, May 16, 2014 at 08:01:59PM +0200, Ondrej Zary wrote:
> 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
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

      reply	other threads:[~2014-05-16 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 18:01 [PATCH] [RESEND] orinoco_usb: Fix broken firmware load error checking Ondrej Zary
2014-05-16 18:10 ` John W. Linville [this message]

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=20140516181054.GF3431@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=gmate.amit@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    /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.