Skip to content

Commit 2405133

Browse files
Wolfram Sangwsakernel
authored andcommitted
i2c: gpio: remove error checks with debugfs
debugfs can handle error pointers in subsequent calls. So, remove the error checks as suggested by kerneldoc of this function. Reported-by: Minjie Du <duminjie@vivo.com> Closes: http://patchwork.ozlabs.org/project/linux-i2c/patch/20230713101829.15548-1-duminjie@vivo.com/ Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 54c76ed commit 2405133

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/i2c/busses/i2c-gpio.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,10 @@ static void i2c_gpio_fault_injector_init(struct platform_device *pdev)
263263
* 'fault-injector' dir there. Until then, we have a global dir with
264264
* all adapters as subdirs.
265265
*/
266-
if (!i2c_gpio_debug_dir) {
266+
if (!i2c_gpio_debug_dir)
267267
i2c_gpio_debug_dir = debugfs_create_dir("i2c-fault-injector", NULL);
268-
if (!i2c_gpio_debug_dir)
269-
return;
270-
}
271268

272269
priv->debug_dir = debugfs_create_dir(pdev->name, i2c_gpio_debug_dir);
273-
if (!priv->debug_dir)
274-
return;
275270

276271
init_completion(&priv->scl_irq_completion);
277272

0 commit comments

Comments
 (0)