Re: [PATCH v7 02/11] mfd: Add max7360 support
From: Lee Jones <lee@kernel.org>
Date: 2025-05-02 08:27:03
Also in:
linux-gpio, linux-input, linux-pwm, lkml
From: Lee Jones <lee@kernel.org>
Date: 2025-05-02 08:27:03
Also in:
linux-gpio, linux-input, linux-pwm, lkml
On Fri, 02 May 2025, Mathieu Dubois-Briand wrote:
On Thu May 1, 2025 at 2:59 PM CEST, Lee Jones wrote:quoted
On Mon, 28 Apr 2025, mathieu.dubois-briand@bootlin.com wrote:quoted
From: Kamel Bouhara <kamel.bouhara@bootlin.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.
Ah yes, you're right. Disregard. -- Lee Jones [李琼斯]