Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: Remove the use of dev_err_probe()

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://patch.msgid.link/20250819092044.549464-4-zhao.xichao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Xichao Zhao and committed by
Mark Brown
2aade32d 0d00ebc6

+2 -4
+1 -2
drivers/spi/spi-microchip-core-qspi.c
··· 701 701 702 702 ctlr = devm_spi_alloc_host(&pdev->dev, sizeof(*qspi)); 703 703 if (!ctlr) 704 - return dev_err_probe(&pdev->dev, -ENOMEM, 705 - "unable to allocate host for QSPI controller\n"); 704 + return -ENOMEM; 706 705 707 706 qspi = spi_controller_get_devdata(ctlr); 708 707 platform_set_drvdata(pdev, qspi);
+1 -2
drivers/spi/spi-microchip-core.c
··· 534 534 535 535 host = devm_spi_alloc_host(&pdev->dev, sizeof(*spi)); 536 536 if (!host) 537 - return dev_err_probe(&pdev->dev, -ENOMEM, 538 - "unable to allocate host for SPI controller\n"); 537 + return -ENOMEM; 539 538 540 539 platform_set_drvdata(pdev, host); 541 540