projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfb735a
)
ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper
author
Yang Yingliang
<yangyingliang@huawei.com>
Wed, 14 Sep 2022 13:33:53 +0000
(21:33 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 14 Sep 2022 14:06:00 +0000
(15:06 +0100)
dev_err/dev_dbg() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link:
https://lore.kernel.org/r/20220914133355.3779364-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/bcm/bcm2835-i2s.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/bcm/bcm2835-i2s.c
b/sound/soc/bcm/bcm2835-i2s.c
index f4d84774dac72851551456f2981f332ddbd0c1ff..85f705afcdbbbb34e12fe56cbc466b58ca65eba1 100644
(file)
--- a/
sound/soc/bcm/bcm2835-i2s.c
+++ b/
sound/soc/bcm/bcm2835-i2s.c
@@
-841,14
+841,9
@@
static int bcm2835_i2s_probe(struct platform_device *pdev)
/* get the clock */
dev->clk_prepared = false;
dev->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(dev->clk)) {
- ret = PTR_ERR(dev->clk);
- if (ret == -EPROBE_DEFER)
- dev_dbg(&pdev->dev, "could not get clk: %d\n", ret);
- else
- dev_err(&pdev->dev, "could not get clk: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(dev->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(dev->clk),
+ "could not get clk\n");
/* Request ioarea */
base = devm_platform_ioremap_resource(pdev, 0);