On Mon, Jul 18, 2022 at 9:50 PM Uwe Kleine-König <ukleinek@xxxxxxxxxx> wrote: > > There are two exit points in the driver's probe function that fail > silently. From a user perspective this is unsatisfactory because the > device is unusable but there is no hint in the kernel log about the > actual problem which makes it unnecessarily hard to fix the problem. > > Make use of dev_err_probe() to emit a problem indication which also does > the right thing if requesting the gpio return -EPROBE_DEFER. ... > + ret = devm_iio_device_register(dev, iio); > + if (ret < 0) Do we really need this ' < 0' part? > + return dev_err_probe(dev, ret, "Failed to register iio device\n"); -- With Best Regards, Andy Shevchenko