On Mon, Nov 1, 2021 at 3:31 PM Lars-Peter Clausen <lars@xxxxxxxxxx> wrote: > > Registering a trigger can fail and the return value of > devm_iio_trigger_register() must be checked. Otherwise undefined behavior > can occur when the trigger is used. ... > + ret = devm_iio_trigger_register(dev, dln2->trig); > + if (ret) { > + dev_err(dev, "failed to register trigger: %d\n", ret); > + return ret; It's fine to use dev_err_ptobe() in ->probe() even for known error codes. Hence, if (ret) return dev_err_probe(dev, ret, "failed to register trigger\n"); > + } Should it be a separate patch? -- With Best Regards, Andy Shevchenko