mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
spi: bcm2835: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20200901152713.18629-4-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
9618947582
commit
65acd82c4e
@ -1319,11 +1319,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
|
||||
|
||||
bs->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(bs->clk)) {
|
||||
err = PTR_ERR(bs->clk);
|
||||
if (err == -EPROBE_DEFER)
|
||||
dev_dbg(&pdev->dev, "could not get clk: %d\n", err);
|
||||
else
|
||||
dev_err(&pdev->dev, "could not get clk: %d\n", err);
|
||||
err = dev_err_probe(&pdev->dev, PTR_ERR(bs->clk),
|
||||
"could not get clk\n");
|
||||
goto out_controller_put;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user