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: <D9LI2Y0J2KZY.15PIU2T55GIH0@bootlin.com>
Date: Fri, 02 May 2025 09:35:45 +0200
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@...tlin.com>
To: "Lee Jones" <lee@...nel.org>
Cc: "Rob Herring" <robh@...nel.org>, "Krzysztof Kozlowski"
 <krzk+dt@...nel.org>, "Conor Dooley" <conor+dt@...nel.org>, "Kamel Bouhara"
 <kamel.bouhara@...tlin.com>, "Linus Walleij" <linus.walleij@...aro.org>,
 "Bartosz Golaszewski" <brgl@...ev.pl>, "Dmitry Torokhov"
 <dmitry.torokhov@...il.com>, Uwe Kleine-König
 <ukleinek@...nel.org>, "Michael Walle" <mwalle@...nel.org>, "Mark Brown"
 <broonie@...nel.org>, "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
 "Rafael J. Wysocki" <rafael@...nel.org>, "Danilo Krummrich"
 <dakr@...nel.org>, <devicetree@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, <linux-gpio@...r.kernel.org>,
 <linux-input@...r.kernel.org>, <linux-pwm@...r.kernel.org>,
 <andriy.shevchenko@...el.com>, Grégory Clement
 <gregory.clement@...tlin.com>, "Thomas Petazzoni"
 <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v7 02/11] mfd: Add max7360 support

On Thu May 1, 2025 at 2:59 PM CEST, Lee Jones wrote:
> On Mon, 28 Apr 2025, mathieu.dubois-briand@...tlin.com wrote:
>
>> From: Kamel Bouhara <kamel.bouhara@...tlin.com>
>> +static int max7360_probe(struct i2c_client *client)
>> +{
>> +	struct device *dev = &client->dev;
>> +	struct regmap *regmap;
>> +	int ret;
>> +
>> +	regmap = devm_regmap_init_i2c(client, &max7360_regmap_config);
>> +	if (IS_ERR(regmap))
>> +		return dev_err_probe(dev, PTR_ERR(regmap), "Failed to initialise regmap\n");
>
> dev_err_ptr_probe()
>

I believe dev_err_ptr_probe() is meant to be used for the opposite case,
where the variable holding the error is an int but the function has to
return a pointer. Here regmap is a pointer but we have to return an int,
so I believe neither dev_err_ptr_probe() or any similar macro can really
help us.

OK for all other points.

Thanks for your review,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ