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

spi: mt65xx: 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-5-zhao.xichao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Xichao Zhao and committed by
Mark Brown
2bee48c9 2aade32d

+1 -1
+1 -1
drivers/spi/spi-mt65xx.c
··· 1159 1159 1160 1160 host = devm_spi_alloc_host(dev, sizeof(*mdata)); 1161 1161 if (!host) 1162 - return dev_err_probe(dev, -ENOMEM, "failed to alloc spi host\n"); 1162 + return -ENOMEM; 1163 1163 1164 1164 host->auto_runtime_pm = true; 1165 1165 host->dev.of_node = dev->of_node;