]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
siox: bus-gpio: Remove the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 19 Aug 2025 12:17:49 +0000 (20:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:59:59 +0000 (15:59 +0200)
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>
Acked-by: Thorsten Scherer <t.scherer@eckelmann.de>
Link: https://lore.kernel.org/r/20250819121749.613584-1-zhao.xichao@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/siox/siox-bus-gpio.c

index d6f93646406347e313d35e0eee9514854defdfb7..413d5f92311ca510e42494bff264db5dcbf6d6ce 100644 (file)
@@ -93,8 +93,7 @@ static int siox_gpio_probe(struct platform_device *pdev)
 
        smaster = devm_siox_master_alloc(dev, sizeof(*ddata));
        if (!smaster)
-               return dev_err_probe(dev, -ENOMEM,
-                                    "failed to allocate siox master\n");
+               return -ENOMEM;
 
        platform_set_drvdata(pdev, smaster);
        ddata = siox_master_get_devdata(smaster);