From: Shawn Lin Date: Mon, 15 Feb 2016 08:27:58 +0000 (+0800) Subject: UPSTREAM: spi: rockchip: disable runtime pm when in err case X-Git-Tag: firefly_0821_release~2447 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d2060410cd1419db48767f55cf0bb65290c7c1d;p=firefly-linux-kernel-4.4.55.git UPSTREAM: 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. Change-Id: I63688e1b07b0b157a663f67e50ac74c5273ce353 Signed-off-by: Shawn Lin Signed-off-by: Mark Brown Signed-off-by: Caesar Wang (cherry picked from git.kernel.org next/linux-next.git master commit b8659adda9e295eca0b10a67f3b15a8644c8ed6f) --- diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index c4e489cb0022..70fb554f037e 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -754,6 +754,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)