Thread (36 messages) 36 messages, 5 authors, 2025-05-07

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

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 [李琼斯]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help