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

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>

authored by

Xichao Zhao and committed by
Mark Brown
67259af7 2bee48c9

+1 -1
+1 -1
drivers/spi/spi-pxa2xx.c
··· 1283 1283 else 1284 1284 controller = devm_spi_alloc_host(dev, sizeof(*drv_data)); 1285 1285 if (!controller) 1286 - return dev_err_probe(dev, -ENOMEM, "cannot alloc spi_controller\n"); 1286 + return -ENOMEM; 1287 1287 1288 1288 drv_data = spi_controller_get_devdata(controller); 1289 1289 drv_data->controller = controller;