From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: gregkh@linuxfoundation.org
Cc: christophe.jaillet@wanadoo.fr, broonie@kernel.org,
olteanv@gmail.com, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] spi: spi-fsl-dspi: Fix a resource leak in an error handling" failed to apply to 4.19-stable tree
Date: Fri, 23 Jul 2021 21:27:50 +0100 [thread overview]
Message-ID: <YPsmRiIXK/Fc+hcm@debian> (raw)
In-Reply-To: <162238346339174@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
Hi Greg,
On Sun, May 30, 2021 at 04:04:23PM +0200, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 4.19-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
Here is the backport, will also apply to 4.14-stable.
--
Regards
Sudip
[-- Attachment #2: 0001-spi-spi-fsl-dspi-Fix-a-resource-leak-in-an-error-han.patch --]
[-- Type: text/x-diff, Size: 1544 bytes --]
From ae0359c102c982850c59f159f5d575b46c4df6e3 Mon Sep 17 00:00:00 2001
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sun, 9 May 2021 21:12:27 +0200
Subject: [PATCH] spi: spi-fsl-dspi: Fix a resource leak in an error handling
path
commit 680ec0549a055eb464dce6ffb4bfb736ef87236e upstream
'dspi_request_dma()' should be undone by a 'dspi_release_dma()' call in the
error handling path of the probe function, as already done in the remove
function
Fixes: 90ba37033cb9 ("spi: spi-fsl-dspi: Add DMA support for Vybrid")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/d51caaac747277a1099ba8dea07acd85435b857e.1620587472.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
[sudip: adjust context]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
drivers/spi/spi-fsl-dspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 1b003dba86f9..25486ee8379b 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1124,11 +1124,13 @@ static int dspi_probe(struct platform_device *pdev)
ret = spi_register_master(master);
if (ret != 0) {
dev_err(&pdev->dev, "Problem registering DSPI master\n");
- goto out_free_irq;
+ goto out_release_dma;
}
return ret;
+out_release_dma:
+ dspi_release_dma(dspi);
out_free_irq:
if (dspi->irq)
free_irq(dspi->irq, dspi);
--
2.30.2
next prev parent reply other threads:[~2021-07-23 20:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-30 14:04 FAILED: patch "[PATCH] spi: spi-fsl-dspi: Fix a resource leak in an error handling" failed to apply to 4.19-stable tree gregkh
2021-07-23 20:27 ` Sudip Mukherjee [this message]
2021-07-26 9:35 ` Greg KH
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=YPsmRiIXK/Fc+hcm@debian \
--to=sudipm.mukherjee@gmail.com \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@linuxfoundation.org \
--cc=olteanv@gmail.com \
--cc=stable@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