diff mbox series

[-next] spi: omap2-mcspi: Switch to use dev_err_probe() helper

Message ID 20220917122504.1896302-1-yangyingliang@huawei.com (mailing list archive)
State Accepted
Commit f4ca8c88c2c7ea3ea17c6fdfcc1af4b007403833
Headers show
Series [-next] spi: omap2-mcspi: Switch to use dev_err_probe() helper | expand

Commit Message

Yang Yingliang Sept. 17, 2022, 12:25 p.m. UTC
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>
---
 drivers/spi/spi-omap2-mcspi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Mark Brown Sept. 19, 2022, 4:50 p.m. UTC | #1
On Sat, 17 Sep 2022 20:25:04 +0800, Yang Yingliang wrote:
> 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.
> 
> 

Applied to

   broonie/spi.git for-next

Thanks!

[1/1] spi: omap2-mcspi: Switch to use dev_err_probe() helper
      commit: f4ca8c88c2c7ea3ea17c6fdfcc1af4b007403833

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

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);