Re: [PATCH] siox: bus-gpio: Remove the use of dev_err_probe()

From: Thorsten Scherer
Date: Sun Aug 24 2025 - 17:29:53 EST


Hello Xichao, Hello Greg,

On Tue, Aug 19, 2025 at 08:17:49PM +0800, Xichao Zhao wrote:
> 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@xxxxxxxx>

Acked-by: Thorsten Scherer <t.scherer@xxxxxxxxxxxx>

@gregkh: Could you please take this patch into your tree?

Xichao, thank you for your contribution and Greg, thank you for taking
care.

Best regards
Thorsten

> ---
> drivers/siox/siox-bus-gpio.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/siox/siox-bus-gpio.c b/drivers/siox/siox-bus-gpio.c
> index d6f936464063..413d5f92311c 100644
> --- a/drivers/siox/siox-bus-gpio.c
> +++ b/drivers/siox/siox-bus-gpio.c
> @@ -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);
> --
> 2.34.1
>