[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd25fd96fa391d3c8a5811d995d166cbb0b0efe5.camel@sipsolutions.net>
Date: Wed, 06 Dec 2023 14:16:15 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Rouven Czerwinski <r.czerwinski@...gutronix.de>,
Josua Mayer <josua@...id-run.com>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: kernel@...gutronix.de, stable@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH] net: rfkill: gpio: set GPIO direction
On Wed, 2023-12-06 at 14:13 +0100, Rouven Czerwinski wrote:
>
> +++ b/net/rfkill/rfkill-gpio.c
> @@ -126,6 +126,16 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
> return -EINVAL;
> }
>
> + if (rfkill->reset_gpio)
> + ret = gpiod_direction_output(rfkill->reset_gpio, true);
> + if (ret)
> + return ret;
> +
> + if (rfkill->shutdown_gpio)
> + ret = gpiod_direction_output(rfkill->shutdown_gpio, true);
> + if (ret)
> + return ret;
>
That's weird, you need ret to be inside the if. It's even entirely
uninitialized if you don't have ACPI, if you don't have reset/shutdown.
johannes
Powered by blists - more mailing lists