netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
To: Dmitry Torokhov <dtor-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: "John W. Linville"
	<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
	Brett Rudley <brudley-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	"Franky (Zhenhui) Lin"
	<frankyl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Hante Meuleman <meuleman-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Pieter-Paul Giesberts
	<pieterpg-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<brcm80211-dev-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] brcmfmac: fix error handling of irq_of_parse_and_map
Date: Sun, 16 Nov 2014 14:02:14 +0100	[thread overview]
Message-ID: <5468A056.9030200@broadcom.com> (raw)
In-Reply-To: <20141114221221.GA35541@dtor-ws>

On 11/14/14 23:12, Dmitry Torokhov wrote:
> Return value of irq_of_parse_and_map() is unsigned int, with 0
> indicating failure, so testing for negative result never works.

Whoops, that is bad. Thanks for catching this. It probably needs to go 
to stable as well for 3.17 kernel.

+Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # v3.17
+Acked-by: Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Dmitry Torokhov<dtor-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ---
>
> Not tested, found by casual code inspection.
>
>   drivers/net/wireless/brcm80211/brcmfmac/of.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/of.c b/drivers/net/wireless/brcm80211/brcmfmac/of.c
> index eb3fce82..c824570 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/of.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/of.c
> @@ -40,8 +40,8 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
>   		return;
>
>   	irq = irq_of_parse_and_map(np, 0);
> -	if (irq<  0) {
> -		brcmf_err("interrupt could not be mapped: err=%d\n", irq);
> +	if (!irq) {
> +		brcmf_err("interrupt could not be mapped\n");
>   		devm_kfree(dev, sdiodev->pdata);
>   		return;
>   	}

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2014-11-16 13:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-14 22:12 [PATCH] brcmfmac: fix error handling of irq_of_parse_and_map Dmitry Torokhov
2014-11-16 13:02 ` Arend van Spriel [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=5468A056.9030200@broadcom.com \
    --to=arend-dy08kvg/lbpwk0htik3j/w@public.gmane.org \
    --cc=brcm80211-dev-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=brudley-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=dtor-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=frankyl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=meuleman-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pieterpg-dY08KVG/lbpWk0Htik3J/w@public.gmane.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 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).