All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: Johannes Berg <johannes@sipsolutions.net>,
	Josua Mayer <josua@solid-run.com>,
	 linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	 kernel@pengutronix.de, Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] net: rfkill: gpio: set GPIO direction
Date: Wed, 06 Dec 2023 14:24:16 +0100	[thread overview]
Message-ID: <6e3049e37b00e2e5a5f02bff7b75d6c9282973b5.camel@pengutronix.de> (raw)
In-Reply-To: <cd25fd96fa391d3c8a5811d995d166cbb0b0efe5.camel@sipsolutions.net>

Hi Johannes,

On Wed, 2023-12-06 at 14:16 +0100, Johannes Berg wrote:
> 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.

Thanks for the review, you are totally right, I didn't look at the ret
initialization. I moved it inside the if for v2.

Thanks,
Rouven

  reply	other threads:[~2023-12-06 13:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 13:13 [PATCH] net: rfkill: gpio: set GPIO direction Rouven Czerwinski
2023-12-06 13:16 ` Johannes Berg
2023-12-06 13:24   ` Rouven Czerwinski [this message]
2023-12-06 14:35     ` Philipp Zabel
2023-12-06 21:41 ` kernel test robot
2023-12-07  7:58 ` [PATCH v2] " Rouven Czerwinski
2023-12-12  9:54   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e3049e37b00e2e5a5f02bff7b75d6c9282973b5.camel@pengutronix.de \
    --to=r.czerwinski@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=josua@solid-run.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.