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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user