spi: rockchip: disable runtime pm when in err case
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 15 Feb 2016 08:27:58 +0000 (16:27 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 15 Feb 2016 12:19:53 +0000 (12:19 +0000)
Before registering master, driver enables runtime pm.
This patch  pm_runtime_disable in err case while probing
driver to balance pm reference count.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-rockchip.c

index 79a8bc4f6cec9e32ec9c78627a2e68fc85ab5e12..c0f9baee1e912468285019c00462237af368efb6 100644 (file)
@@ -749,6 +749,7 @@ static int rockchip_spi_probe(struct platform_device *pdev)
        return 0;
 
 err_register_master:
+       pm_runtime_disable(&pdev->dev);
        if (rs->dma_tx.ch)
                dma_release_channel(rs->dma_tx.ch);
        if (rs->dma_rx.ch)