summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-04-02 16:45:23 +0200
committerMark Brown <broonie@kernel.org>2024-04-02 16:55:36 +0200
commit33aa27a09e9df5860fe495032a067504d025db77 (patch)
tree55095f9b055d3ad0f97c8798464e0a5c2e6bbf0f /drivers/spi/spi-pxa2xx.c
parentspi: docs: drop driver owner initialization (diff)
downloadlinux-33aa27a09e9df5860fe495032a067504d025db77.tar.xz
linux-33aa27a09e9df5860fe495032a067504d025db77.zip
spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type
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> Link: https://msgid.link/r/20240402144523.3402063-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/spi/spi-pxa2xx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index b01a18c89b6b..2d128ddf18ab 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1375,8 +1375,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 */