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: <5dd8d6ec-8c16-4c7d-aa47-b66d076a83e6@baylibre.com>
Date: Thu, 12 Jun 2025 10:33:17 -0500
From: David Lechner <dlechner@...libre.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
 Michael Hennerich <Michael.Hennerich@...log.com>,
 Antoniu Miclaus <antoniu.miclaus@...log.com>,
 Jonathan Cameron <jic23@...nel.org>, Nuno Sá
 <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/5] iio: amplifiers: ada4250: use dev_err_probe()

On 6/12/25 8:05 AM, Andy Shevchenko wrote:
> On Wed, Jun 11, 2025 at 04:33:05PM -0500, David Lechner wrote:
>> Use dev_err_probe() when returning an error in the probe function.
> 
> ...
> 
>>  	mutex_init(&st->lock);
> 
> Side note. Switch to devm?

Yup, missed that.

> 
> ...
> 
>>  	ret = ada4250_init(st);
> 
> Is this used only in ->probe() stage? If so, please also move to
> dev_err_probe() there.

After all of the other changes, there was nothing left to convert
to dev_err_probe() there.

> 
>> -	if (ret) {
>> -		dev_err(&spi->dev, "ADA4250 init failed\n");
>> -		return ret;
>> -	}
>> +	if (ret)
>> +		return dev_err_probe(&spi->dev, ret, "ADA4250 init failed\n");
>>  
>>  	return devm_iio_device_register(&spi->dev, indio_dev);
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ