On Mon, Jul 18, 2022 at 9:51 PM Uwe Kleine-König <ukleinek@xxxxxxxxxx> wrote: > > All but one error path use dev_err_probe() to emit a message. Use the same > incarnation for the remaining exit point for consistency. ... > + if (dht11->irq < 0) > + return dev_err_probe(dev, -EINVAL, "GPIO %d has no interrupt\n", > + desc_to_gpio(dht11->gpiod)); Oh, what I missed is the error code shadowing. Can't we propagate the real error code? -EINVAL --> dht11->irq And to be honest I don't like this desc_to_gpio() usage. It's not for board files, it will bring confusing information to the user. What is important is the name of GPIO, i.o.w. "connection id". -- With Best Regards, Andy Shevchenko