spi: pxa2xx: 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-6-zhao.xichao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Xichao Zhao 2025-08-19 17:20:42 +08:00 committed by Mark Brown
parent 2bee48c9d1
commit 67259af782
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -1283,7 +1283,7 @@ int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp,
else else
controller = devm_spi_alloc_host(dev, sizeof(*drv_data)); controller = devm_spi_alloc_host(dev, sizeof(*drv_data));
if (!controller) if (!controller)
return dev_err_probe(dev, -ENOMEM, "cannot alloc spi_controller\n"); return -ENOMEM;
drv_data = spi_controller_get_devdata(controller); drv_data = spi_controller_get_devdata(controller);
drv_data->controller = controller; drv_data->controller = controller;