[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mc8ViSPyTn9Brr-us2V+D7Jv3u+B8Ek2nuzF36yH70RAw@mail.gmail.com>
Date: Sun, 7 Dec 2025 20:48:27 -0800
From: Bartosz Golaszewski <brgl@...nel.org>
To: Daniel Gibson <daniel@...son.sh>
Cc: linux-gpio@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Lixu Zhang <lixu.zhang@...el.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>, Yinbo Zhu <zhuyinbo@...ngson.cn>
Subject: Re: [PATCH 05/12] gpio: it87: use new line value setter callbacks
On Sun, 7 Dec 2025 05:55:15 +0100, Daniel Gibson <daniel@...son.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
Powered by blists - more mailing lists