mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
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>
This commit is contained in:
parent
a0c4b12043
commit
f4ca8c88c2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user