1
0

spi: SPISG: 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-3-zhao.xichao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Xichao Zhao
2025-08-19 17:20:39 +08:00
committed by Mark Brown
parent 2a5d410916
commit 0d00ebc6b8

View File

@@ -733,7 +733,7 @@ static int aml_spisg_probe(struct platform_device *pdev)
else
ctlr = spi_alloc_host(dev, sizeof(*spisg));
if (!ctlr)
return dev_err_probe(dev, -ENOMEM, "controller allocation failed\n");
return -ENOMEM;
spisg = spi_controller_get_devdata(ctlr);
spisg->controller = ctlr;