1
0

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>
This commit is contained in:
Xichao Zhao
2025-08-19 17:20:40 +08:00
committed by Mark Brown
parent 0d00ebc6b8
commit 2aade32d1f
2 changed files with 2 additions and 4 deletions

View File

@@ -701,8 +701,7 @@ static int mchp_coreqspi_probe(struct platform_device *pdev)
ctlr = devm_spi_alloc_host(&pdev->dev, sizeof(*qspi));
if (!ctlr)
return dev_err_probe(&pdev->dev, -ENOMEM,
"unable to allocate host for QSPI controller\n");
return -ENOMEM;
qspi = spi_controller_get_devdata(ctlr);
platform_set_drvdata(pdev, qspi);

View File

@@ -534,8 +534,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
host = devm_spi_alloc_host(&pdev->dev, sizeof(*spi));
if (!host)
return dev_err_probe(&pdev->dev, -ENOMEM,
"unable to allocate host for SPI controller\n");
return -ENOMEM;
platform_set_drvdata(pdev, host);