Thread (20 messages) 20 messages, 6 authors, 2025-12-08

Re: [PATCH 05/12] gpio: it87: use new line value setter callbacks

From: Daniel Gibson <hidden>
Date: 2025-12-07 04:55:43
Also in: imx, linux-gpio, lkml

Hi,
I got one nitpick/question about this, see below

On 4/23/25 09:15, Bartosz Golaszewski wrote:
quoted hunk ↗ jump to hunk
@@ -249,7 +250,9 @@ static int it87_gpio_direction_out(struct gpio_chip *chip,
 	/* set the output enable bit */
 	superio_set_mask(mask, group + it87_gpio->output_base);
 
-	it87_gpio_set(chip, gpio_num, val);
+	rc = it87_gpio_set(chip, gpio_num, val);
+	if (rc)
+		goto exit;
 >  	superio_exit();
Are you sure that superio_exit() should be skipped (with goto exit) in
case it87_gpio_set() fails?
After all, superio_enter() above (not visible here) succeeded,
only the it87_gpio_set() call failed.

Of course this is kinda academic because currently it87_gpio_set()
always returns 0, but if it ever doesn't, this might become a bug?

Cheers,
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help