projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0c4b12
)
spi: omap2-mcspi: Switch to use dev_err_probe() helper
author
Yang Yingliang
<yangyingliang@huawei.com>
Sat, 17 Sep 2022 12:25:04 +0000
(20:25 +0800)
committer
Mark Brown
<broonie@kernel.org>
Mon, 19 Sep 2022 14:44:18 +0000
(15:44 +0100)
In the probe path, dev_err() can be replace with dev_err_probe()
which will check if error code is -EPROBE_DEFER and prints the
error name.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link:
https://lore.kernel.org/r/20220917122504.1896302-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-omap2-mcspi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-omap2-mcspi.c
b/drivers/spi/spi-omap2-mcspi.c
index c42e59df38fedf3af18bf866382a8d4bb1499276..80e79f3aa0c44fdc0f574043429e6213876726d2 100644
(file)
--- a/
drivers/spi/spi-omap2-mcspi.c
+++ b/
drivers/spi/spi-omap2-mcspi.c
@@
-1509,10
+1509,8
@@
static int omap2_mcspi_probe(struct platform_device *pdev)
}
status = platform_get_irq(pdev, 0);
- if (status == -EPROBE_DEFER)
- goto free_master;
- if (status < 0) {
- dev_err(&pdev->dev, "no irq resource found\n");
+ if (status) {
+ dev_err_probe(&pdev->dev, status, "no irq resource found\n");
goto free_master;
}
init_completion(&mcspi->txdone);