From: Andy Shevchenko Date: Tue, 2 Apr 2024 14:45:23 +0000 (+0300) Subject: spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=33aa27a09e9df5860fe495032a067504d025db77;p=linux.git 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 Link: https://msgid.link/r/20240402144523.3402063-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index b01a18c89b6bc..2d128ddf18abd 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 */