diff options
author | Dragan Simic <dsimic@manjaro.org> | 2024-09-29 12:21:15 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-10-08 20:41:05 +0300 |
commit | 7d46b8d8d78338a2ad986eec0790ddb22fad23a8 (patch) | |
tree | 9202e92ec24b0e03b4c38d6f940222841a1f6cee /drivers/spi | |
parent | cb91287b3b6d42e66f948fbc304f771792c2852f (diff) | |
download | linux-7d46b8d8d78338a2ad986eec0790ddb22fad23a8.tar.xz |
spi: rockchip-sfc: Use dev_err_probe() in the probe path
Use function dev_err_probe() in the probe path instead of dev_err() where
appropriate, to make the code a bit more uniform and compact.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://patch.msgid.link/398229ef316e64dc0c27944ea793dcddef1ead4e.1727601608.git.dsimic@manjaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-rockchip-sfc.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c index 505d5089bf03..7e0fb4944a34 100644 --- a/drivers/spi/spi-rockchip-sfc.c +++ b/drivers/spi/spi-rockchip-sfc.c @@ -580,16 +580,14 @@ static int rockchip_sfc_probe(struct platform_device *pdev) return PTR_ERR(sfc->regbase); sfc->clk = devm_clk_get(&pdev->dev, "clk_sfc"); - if (IS_ERR(sfc->clk)) { - dev_err(&pdev->dev, "Failed to get sfc interface clk\n"); - return PTR_ERR(sfc->clk); - } + if (IS_ERR(sfc->clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(sfc->clk), + "Failed to get sfc interface clk\n"); sfc->hclk = devm_clk_get(&pdev->dev, "hclk_sfc"); - if (IS_ERR(sfc->hclk)) { - dev_err(&pdev->dev, "Failed to get sfc ahb clk\n"); - return PTR_ERR(sfc->hclk); - } + if (IS_ERR(sfc->hclk)) + return dev_err_probe(&pdev->dev, PTR_ERR(sfc->hclk), + "Failed to get sfc ahb clk\n"); sfc->use_dma = !of_property_read_bool(sfc->dev->of_node, "rockchip,sfc-no-dma"); |