From: Lars-Peter Clausen <lars@metafoo.de>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>, broonie@kernel.org
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] spi: spi-axi: Free resources on error path
Date: Mon, 9 Jan 2017 01:11:44 +0100 [thread overview]
Message-ID: <5a377f44-f548-2167-51bf-4fb46890fae3@metafoo.de> (raw)
In-Reply-To: <20170109000247.3215-1-christophe.jaillet@wanadoo.fr>
On 01/09/2017 01:02 AM, Christophe JAILLET wrote:
> We should go to 'err_put_master' here instead of returning directly.
> Otherwise a call to 'spi_master_put' is missing.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Thanks.
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> drivers/spi/spi-axi-spi-engine.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c
> index 319225d7e761..6ab4c7700228 100644
> --- a/drivers/spi/spi-axi-spi-engine.c
> +++ b/drivers/spi/spi-axi-spi-engine.c
> @@ -494,7 +494,8 @@ static int spi_engine_probe(struct platform_device *pdev)
> SPI_ENGINE_VERSION_MAJOR(version),
> SPI_ENGINE_VERSION_MINOR(version),
> SPI_ENGINE_VERSION_PATCH(version));
> - return -ENODEV;
> + ret = -ENODEV;
> + goto err_put_master;
> }
>
> spi_engine->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");
>
next prev parent reply other threads:[~2017-01-09 0:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 0:02 [PATCH] spi: spi-axi: Free resources on error path Christophe JAILLET
2017-01-09 0:11 ` Lars-Peter Clausen [this message]
2017-01-09 20:02 ` Applied "spi: spi-axi: Free resources on error path" to the spi tree Mark Brown
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=5a377f44-f548-2167-51bf-4fb46890fae3@metafoo.de \
--to=lars@metafoo.de \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@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).