summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-omap2-mcspi.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-09-17 15:25:04 +0300
committerMark Brown <broonie@kernel.org>2022-09-19 17:44:18 +0300
commitf4ca8c88c2c7ea3ea17c6fdfcc1af4b007403833 (patch)
tree159e50bc46fcfeaacde55c13bfb4e289f7b42629 /drivers/spi/spi-omap2-mcspi.c
parenta0c4b120431172490793fb21d43c908b35fd3e50 (diff)
downloadlinux-f4ca8c88c2c7ea3ea17c6fdfcc1af4b007403833.tar.xz
spi: omap2-mcspi: Switch to use dev_err_probe() helper
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>
Diffstat (limited to 'drivers/spi/spi-omap2-mcspi.c')
-rw-r--r--drivers/spi/spi-omap2-mcspi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index c42e59df38fe..80e79f3aa0c4 100644
--- 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);