[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230921213507.pfs3gp5uwgemsqoe@zenone.zhora.eu>
Date: Thu, 21 Sep 2023 23:35:07 +0200
From: Andi Shyti <andi.shyti@...nel.org>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-renesas-soc@...r.kernel.org, Minjie Du <duminjie@...o.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i2c: gpio: remove error checks with debugfs
Hi Wolfram,
[...]
> diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> index e5a5b9e8bf2c..fb35a75fe0e3 100644
> --- a/drivers/i2c/busses/i2c-gpio.c
> +++ b/drivers/i2c/busses/i2c-gpio.c
> @@ -263,15 +263,10 @@ static void i2c_gpio_fault_injector_init(struct platform_device *pdev)
> * 'fault-injector' dir there. Until then, we have a global dir with
> * all adapters as subdirs.
> */
> - if (!i2c_gpio_debug_dir) {
> + if (!i2c_gpio_debug_dir)
> i2c_gpio_debug_dir = debugfs_create_dir("i2c-fault-injector", NULL);
> - if (!i2c_gpio_debug_dir)
> - return;
> - }
>
> priv->debug_dir = debugfs_create_dir(pdev->name, i2c_gpio_debug_dir);
> - if (!priv->debug_dir)
> - return;
nice... this reminds me of some more cleanups that needs to be
done elsewhere.
Another good thing that comes out from this patch is that if a
debgufs entry is not created it's not a big deal and we shouldn't
return but move ahead with the function execution.
Reviewed-by: Andi Shyti <andi.shyti@...nel.org>
Andi
Powered by blists - more mailing lists