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 */