diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-02 21:36:48 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2020-09-07 09:11:32 +0200 |
commit | aec429e09e2d51e34ecdea5446d6061ec2e4bf74 (patch) | |
tree | 6e81e5b222e2118d1141269725fe1930880d8581 /drivers/mmc | |
parent | mmc: core: Allow setting slot index via device tree alias (diff) | |
download | linux-aec429e09e2d51e34ecdea5446d6061ec2e4bf74.tar.xz linux-aec429e09e2d51e34ecdea5446d6061ec2e4bf74.zip |
mmc: 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/20200902193658.20539-2-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/bcm2835.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index a0767790a826..35320bc9dc02 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1406,9 +1406,7 @@ static int bcm2835_probe(struct platform_device *pdev) clk = devm_clk_get(dev, NULL); if (IS_ERR(clk)) { - ret = PTR_ERR(clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, "could not get clk: %d\n", ret); + ret = dev_err_probe(dev, PTR_ERR(clk), "could not get clk\n"); goto err; } |