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

Bartosz Golaszewski brgl at kernel.org
Sun Dec 7 20:48:27 PST 2025


On Sun, 7 Dec 2025 05:55:15 +0100, Daniel Gibson <daniel at gibson.sh> said:
> Hi,
> I got one nitpick/question about this, see below
>
> On 4/23/25 09:15, Bartosz Golaszewski wrote:
>> @@ -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?
>

Thanks for bringing it to my attention, you're probably right and thats's
just an unintentional omission on my part. Do you want to send a patch that
will fix it or do you prefer me to do it?

Bart



More information about the linux-arm-kernel mailing list