Skip to content

Commit

Permalink
spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe()
Browse files Browse the repository at this point in the history
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: 0b89fc0 ("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>
  • Loading branch information
MarkMrLi authored and broonie committed Apr 19, 2023
1 parent e8d018d commit 359f5b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-rockchip-sfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 359f5b0

Please sign in to comment.