lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZifYwxjNxfM1LwW7@smile.fi.intel.com>
Date: Tue, 23 Apr 2024 18:50:27 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: nuno.sa@...log.com
Cc: Petr Mladek <pmladek@...e.com>, Chris Down <chris@...isdown.name>,
	John Ogness <john.ogness@...utronix.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jonathan Cameron <jic23@...nel.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Olivier Moysan <olivier.moysan@...s.st.com>,
	Andi Shyti <andi.shyti@...nel.org>,
	Jyoti Bhayana <jbhayana@...gle.com>, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org
Subject: Re: [PATCH v2 4/4] iio: common: scmi_iio: convert to dev_err_probe()

On Tue, Apr 23, 2024 at 05:20:33PM +0200, Nuno Sa via B4 Relay wrote:
> From: Nuno Sa <nuno.sa@...log.com>
> 
> Make use of dev_err_probe() and dev_err_ptr_probe() to simplify error paths
> during probe.

..

> +		return dev_err_ptr_probe(&iiodev->dev, ret,
> +					 "Error in registering sensor update notifier for sensor %s err %d",

\n

> +					 sensor->sensor_info->name, ret);

..

> +			return dev_err_probe(dev, -EINVAL,
> +					     "SCMI sensor %d has missing info\n", i);

One line? (It's 99 if you use relaxed limit).

..

> +			return dev_err_probe(dev, PTR_ERR(scmi_iio_dev),
> +					     "failed to allocate IIO device for sensor %s: %ld\n",
> +					     sensor_info->name, PTR_ERR(scmi_iio_dev));

Please, be sure you remove double error code printing, dev_err_probe() does it
for you already. (This applies to all places like this, if any, in the entire
series.)

..

> +			return dev_err_probe(dev, err,
> +					     "IIO buffer setup error at sensor %s: %d\n",
> +					     sensor_info->name, err);

Ditto.

..

> +			return dev_err_probe(dev, err,
> +					     "IIO device registration failed at sensor %s: %d\n",
> +					     sensor_info->name, err);

Ditto.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ