spi: pxa2xx: Disable runtime PM if controller registration fails
Don't leave runtime PM enabled in case devm_spi_register_controller() returns with an error. Otherwise runtime PM will complain when driver is reloaded: [ 693.855811] pxa2xx-spi pxa2xx-spi.13: Unbalanced pm_runtime_enable! Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Родитель
7928b2cbe5
Коммит
e2b714afee
|
@ -1802,6 +1802,8 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
out_error_clock_enabled:
|
out_error_clock_enabled:
|
||||||
|
pm_runtime_put_noidle(&pdev->dev);
|
||||||
|
pm_runtime_disable(&pdev->dev);
|
||||||
clk_disable_unprepare(ssp->clk);
|
clk_disable_unprepare(ssp->clk);
|
||||||
pxa2xx_spi_dma_release(drv_data);
|
pxa2xx_spi_dma_release(drv_data);
|
||||||
free_irq(ssp->irq, drv_data);
|
free_irq(ssp->irq, drv_data);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче