mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type
@ 2024-04-02 14:45 Andy Shevchenko
  2024-04-02 19:30 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-04-02 14:45 UTC (permalink / raw)
  To: Andy Shevchenko, linux-arm-kernel, linux-spi, linux-kernel
  Cc: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Mark Brown

pxa_ssp_request() implies a reference counting, hence the pxa_ssp_free()
must be called when we are done. Add missed call.

Fixes: bb77c99ee6d3 ("spi: pxa2xx: Skip SSP initialization if it's done elsewhere")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 86d0f1064a45..1348249f8178 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1379,8 +1379,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
 		type = (enum pxa_ssp_type)value;
 	} else {
 		ssp = pxa_ssp_request(pdev->id, pdev->name);
-		if (ssp)
+		if (ssp) {
 			type = ssp->type;
+			pxa_ssp_free(ssp);
+		}
 	}
 
 	/* Validate the SSP type correctness */
-- 
2.43.0.rc1.1.gbec44491f096


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type
  2024-04-02 14:45 [PATCH v1 1/1] spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type Andy Shevchenko
@ 2024-04-02 19:30 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-04-02 19:30 UTC (permalink / raw)
  To: linux-arm-kernel, linux-spi, linux-kernel, Andy Shevchenko
  Cc: Daniel Mack, Haojian Zhuang, Robert Jarzmik

On Tue, 02 Apr 2024 17:45:23 +0300, Andy Shevchenko wrote:
> pxa_ssp_request() implies a reference counting, hence the pxa_ssp_free()
> must be called when we are done. Add missed call.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type
      commit: 33aa27a09e9df5860fe495032a067504d025db77

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-02 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 14:45 [PATCH v1 1/1] spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type Andy Shevchenko
2024-04-02 19:30 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®