summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-02-15 09:27:58 +0100
committerMark Brown <broonie@kernel.org>2016-02-15 13:19:53 +0100
commitb8659adda9e295eca0b10a67f3b15a8644c8ed6f (patch)
treeaa19fe86cbdaf5c31a3419a95c7b2a074610bd55 /drivers/spi
parentLinux 4.5-rc1 (diff)
downloadlinux-b8659adda9e295eca0b10a67f3b15a8644c8ed6f.tar.xz
linux-b8659adda9e295eca0b10a67f3b15a8644c8ed6f.zip
spi: rockchip: disable runtime pm when in err case
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-rockchip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 79a8bc4f6cec..c0f9baee1e91 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -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)