Re: [PATCH v3] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init()

From: Andi Shyti
Date: Thu Jul 13 2023 - 05:54:35 EST


Hi Markus,

> > +++ b/drivers/i2c/busses/i2c-gpio.c
> > @@ -265,7 +265,7 @@ static void i2c_gpio_fault_injector_init(struct platform_device *pdev)
> > */
> > if (!i2c_gpio_debug_dir) {
> > i2c_gpio_debug_dir = debugfs_create_dir("i2c-fault-injector", NULL);
> > - if (!i2c_gpio_debug_dir)
> > + if (IS_ERR(i2c_gpio_debug_dir))
> > return;
> > }
>
> Will the development attention grow also for the exception handling
> which is missing here so far?

Well, it depends why you need to handle the error return. I think
it's not important if this fails... the only reason I would
handle the error here is to print a warning in dmesg.

Thank you,
Andi