linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH for-4.12 1/3] brcmfmac: add parameter to pass error code in firmware callback
Date: Thu, 15 Jun 2017 19:17:49 +0300	[thread overview]
Message-ID: <87vanxns2a.fsf@purkki.adurom.net> (raw)
In-Reply-To: <1497268054-4507-2-git-send-email-arend.vanspriel@broadcom.com> (Arend van Spriel's message of "Mon, 12 Jun 2017 12:47:32 +0100")

Arend van Spriel <arend.vanspriel@broadcom.com> writes:

> Extend the parameters in the firmware callback so it can be called
> upon success and failure. This allows the caller to properly clear
> all resources in the failure path. Right now the error code is
> always zero, ie. success.
>
> Cc: stable@vger.kernel.org # 4.9.x-
> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>

[...]

> -static void brcmf_usb_probe_phase2(struct device *dev,
> +static void brcmf_usb_probe_phase2(struct device *dev, int ret,
>  				   const struct firmware *fw,
>  				   void *nvram, u32 nvlen)
>  {
>  	struct brcmf_bus *bus =3D dev_get_drvdata(dev);
>  	struct brcmf_usbdev_info *devinfo;
> -	int ret;
> +
> +	if (ret)
> +		goto error;

This introduces a new warning:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1198:2: warning:
=E2=80=98devinfo=E2=80=99 may be used uninitialized in this function
[-Wmaybe-uninitialized]

>From a quick look I think it's valid, but due to my mistake I only
noticed it after I had applied the patch. So can you send a small
followup patch to fix this, please?

--=20
Kalle Valo

  parent reply	other threads:[~2017-06-15 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 11:47 [PATCH for-4.12 0/3] brcmfmac: fix sdio suspend crash due to firmware load failure Arend van Spriel
2017-06-12 11:47 ` [PATCH for-4.12 1/3] brcmfmac: add parameter to pass error code in firmware callback Arend van Spriel
2017-06-15 16:08   ` [for-4.12, " Kalle Valo
2017-06-15 16:17   ` Kalle Valo [this message]
2017-06-12 11:47 ` [PATCH for-4.12 2/3] brcmfmac: use firmware callback upon failure to load Arend van Spriel
2017-06-12 11:47 ` [PATCH for-4.12 3/3] brcmfmac: unbind all devices upon failure in firmware callback Arend van Spriel
2017-06-13  6:12   ` [for-4.12, " Kalle Valo
     [not found]   ` <20170613061235.D11C6607CC@smtp.codeaurora.org>
2017-06-13 11:36     ` Arend van Spriel

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=87vanxns2a.fsf@purkki.adurom.net \
    --to=kvalo@codeaurora.org \
    --cc=arend.vanspriel@broadcom.com \
    --cc=linux-wireless@vger.kernel.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).