]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
spi: pxa2xx: Remove the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 19 Aug 2025 09:20:42 +0000 (17:20 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 19 Aug 2025 12:06:02 +0000 (13:06 +0100)
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>
drivers/spi/spi-pxa2xx.c

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