Commit 33aa27a0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

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: bb77c99e ("spi: pxa2xx: Skip SSP initialization if it's done elsewhere")
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://msgid.link/r/20240402144523.3402063-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5da57c7c
...@@ -1375,8 +1375,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) ...@@ -1375,8 +1375,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
type = (enum pxa_ssp_type)value; type = (enum pxa_ssp_type)value;
} else { } else {
ssp = pxa_ssp_request(pdev->id, pdev->name); ssp = pxa_ssp_request(pdev->id, pdev->name);
if (ssp) if (ssp) {
type = ssp->type; type = ssp->type;
pxa_ssp_free(ssp);
}
} }
/* Validate the SSP type correctness */ /* Validate the SSP type correctness */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment