summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-rockchip-sfc.c
diff options
context:
space:
mode:
authorLi Lanzhe <u202212060@hust.edu.cn>2023-04-19 07:50:29 -0400
committerMark Brown <broonie@kernel.org>2023-04-19 13:42:59 +0100
commit359f5b0d4e26b7a7bcc574d6148b31a17cefe47d (patch)
tree348844e01ebdfa7b0263ebb2ccdcc59decd52d39 /drivers/spi/spi-rockchip-sfc.c
parente8d018dd0257f744ca50a729e3d042cf2ec9da65 (diff)
downloadlwn-359f5b0d4e26b7a7bcc574d6148b31a17cefe47d.tar.gz
lwn-359f5b0d4e26b7a7bcc574d6148b31a17cefe47d.zip
spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe()
If devm_request_irq() fails, then we are directly return 'ret' without clk_disable_unprepare(sfc->clk) and clk_disable_unprepare(sfc->hclk). Fix this by changing direct return to a goto 'err_irq'. Fixes: 0b89fc0a367e ("spi: rockchip-sfc: add rockchip serial flash controller") Signed-off-by: Li Lanzhe <u202212060@hust.edu.cn> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Link: https://lore.kernel.org/r/20230419115030.6029-1-u202212060@hust.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-rockchip-sfc.c')
-rw-r--r--drivers/spi/spi-rockchip-sfc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
index bd87d3c92dd3..69347b6bf60c 100644
--- a/drivers/spi/spi-rockchip-sfc.c
+++ b/drivers/spi/spi-rockchip-sfc.c
@@ -632,7 +632,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
if (ret) {
dev_err(dev, "Failed to request irq\n");
- return ret;
+ goto err_irq;
}
ret = rockchip_sfc_init(sfc);