[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd0a00e3-9b8c-43e8-8772-e67b91f4c71e@gibson.sh>
Date: Sun, 7 Dec 2025 05:55:15 +0100
From: Daniel Gibson <daniel@...son.sh>
To: 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>
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>
Subject: Re: [PATCH 05/12] gpio: it87: use new line value setter callbacks
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?
Cheers,
Daniel
Powered by blists - more mailing lists