Re: [PATCH v3 5/6] iio: light: ltr501: Add ltr329 driver support

Andy Shevchenko <[email protected]>
Newsgroups gmane.linux.kernel.iio,gmane.linux.drivers.devicetree,gmane.linux.kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Fri, Aug 07, 2026 at 09:53:11AM +0200, Esben Haabendal wrote:
> "Andy Shevchenko" <[email protected]> writes:
> > On Tue, Aug 04, 2026 at 07:02:16PM +0200, Esben Haabendal wrote:

...

> >>  	if (client->irq > 0) {
> >> +		if (!ltr501_has_irq_support(data->chip_info)) {
> >> +			dev_err(&client->dev, "chip does not support irq\n");
> >> +			ret = -EINVAL;
> >
> > Can this be
> >
> > 			ret = dev_err_probe(-EINVAL);
> 
> Sure can, if that is the preferred style. But it will probably still be
> two lines due to line width considerations.

Even older kernels' checkpatch won't complain on that long line (as ending by
a sting literal). But it's up to you.

> And personally, as it would not take advantage of the -EPROBE_DEFER
> logic of dev_err_probe(), I find the dev_err() style more clear.

The point is to use the unified template for the probe error messages (that's
why you may find a patch against dev_err_probe() documentation that allows this
kind of use).

> >> +			goto powerdown_on_error;
> >> +		}

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.