netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Alexander Aring <aar@pengutronix.de>
Cc: <linux-kernel@vger.kernel.org>, <linux-wpan@vger.kernel.org>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH] ieee802154/adf7242: fix memory leak of firmware
Date: Thu, 7 Apr 2016 13:09:57 +0200	[thread overview]
Message-ID: <57064005.2040801@analog.com> (raw)
In-Reply-To: <1460027764-27428-1-git-send-email-sudipm.mukherjee@gmail.com>

On 04/07/2016 01:16 PM, Sudip Mukherjee wrote:
> If the firmware upload or the firmware verification fails then we
> printed the error message and exited but we missed releasing the
> firmware.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   drivers/net/ieee802154/adf7242.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c
> index 89154c0..91d4531 100644
> --- a/drivers/net/ieee802154/adf7242.c
> +++ b/drivers/net/ieee802154/adf7242.c
> @@ -1030,6 +1030,7 @@ static int adf7242_hw_init(struct adf7242_local *lp)
>   	if (ret) {
>   		dev_err(&lp->spi->dev,
>   			"upload firmware failed with %d\n", ret);
> +		release_firmware(fw);
>   		return ret;
>   	}
>
> @@ -1037,6 +1038,7 @@ static int adf7242_hw_init(struct adf7242_local *lp)
>   	if (ret) {
>   		dev_err(&lp->spi->dev,
>   			"verify firmware failed with %d\n", ret);
> +		release_firmware(fw);
>   		return ret;
>   	}
>
>


-- 
Greetings,
Michael

  reply	other threads:[~2016-04-07 11:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 11:16 [PATCH] ieee802154/adf7242: fix memory leak of firmware Sudip Mukherjee
2016-04-07 11:09 ` Michael Hennerich [this message]
2016-04-08 17:34 ` Marcel Holtmann

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=57064005.2040801@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=aar@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.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 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).