Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp965563rdb; Wed, 6 Dec 2023 05:16:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWexLCyJF2LHOiQLxw58spuHEGkTJY9hJ/JL6GlCJAM4cRMlVI8aN3QyRRP9e8y81iCD54 X-Received: by 2002:a17:902:c1ca:b0:1d0:b013:229 with SMTP id c10-20020a170902c1ca00b001d0b0130229mr611738plc.23.1701868593948; Wed, 06 Dec 2023 05:16:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701868593; cv=none; d=google.com; s=arc-20160816; b=lh8CwwWt1Ldn2zW8macyKln4UoqTwR/mcPb1Tf+7+x7fjQPYnBTJQE8Zv/hyMFTjc4 GNBOF0WDfkXfj+rhCyCDDLg/vCM818fxboe41LPaxBLN/hJ4knD5X7/+RnLCVsOQYedw g5V9hDM/vkBoMR3NnhU8XLPNhReApyYI/Ga9VE+SK5y/i4dgizlertxcV7rh2CwYggcl bj07C0leagZEEbbiSEnj+yGAdqtFgaGFO6zq7zuU7yHJCVYghJA1k2QyMz/NXJ7sJi35 3zp/GNGFxwu9woENXMKq09i5OWyWdN8rN88vOGAfyopsw+2tx24YYACim2mXeWJ+6DsM QpWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=9xb/j8079N30XiCpQfsE2XSQRB8MrOJjvILD0qCjplA=; fh=gX9iT52eaegvQp1nKIaErmmdHh8q71+gmws2fzaFLmY=; b=XC+SMpDkUOCbdoB2oBOJEO4EC1cPlhWAsDgLkN4hmKLuIT82Y8VPR/ufwq9Rtn9uVd m/FJamdofSmTc2pKhLec57hisDWlMGLREICxZrewsE/xdfTBkCI3IWUolOXZ6c7dmDXX yR18U00+XNSVBb4h0LPT44iJkK/PpgX7QOvRD/yz6/wKQseJ4/exJ+Pn3Af0kahARAke sveRtDQL3Vv0QNoT8isR1y4P7/vFvWeLpmdP4N1C6iPOCZJdpia5DM/VGrAuPdutoCOX ldWNqN+qcWqWcjmbWcvhqOTMng24zjI8RTMpvPDoJkVKCno0YFnUy2PmPu55av3D08B4 fwSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=xaLQFagE; spf=pass (google.com: domain of linux-wireless+bounces-498-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u12-20020a17090341cc00b001c754f13381si3916141ple.455.2023.12.06.05.16.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 05:16:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-498-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=xaLQFagE; spf=pass (google.com: domain of linux-wireless+bounces-498-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A8C22B20E24 for ; Wed, 6 Dec 2023 13:16:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 823B5374EA; Wed, 6 Dec 2023 13:16:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="xaLQFagE" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D1F4AC; Wed, 6 Dec 2023 05:16:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=9xb/j8079N30XiCpQfsE2XSQRB8MrOJjvILD0qCjplA=; t=1701868581; x=1703078181; b=xaLQFagEZqYh1tkDzaYFr8lElv1xj6gKYaOCl34tQDuzj+9 GXWnOkKrvJAfp/R6yc71cWAoR4TfsFniWYvyDtg896k0KhHQySv4bUwPjfl1Sxyy0b/yUC6cHBirM tFB3rFR9B9ljB5loCeut7ilBwFQ12YKtFdBj5t9hqEwYZC1fnnyppx5A0kgNW/rf/7Typa8qtdToU vsYWyTXXmrCCRRpgP23d2LUA7gRqJXxK70nxclSu/YaEGMrC3hK0AuPTqB+I2YXDYIpUejcxN1AwZ Z2tXEt3kCX1XjkbIoLFHlOsJxmbzhT9jfJFZAgxK9/VX9/tU4nie9zmqOK/z7OXQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rArlB-000000004Nm-0dCe; Wed, 06 Dec 2023 14:16:17 +0100 Message-ID: Subject: Re: [PATCH] net: rfkill: gpio: set GPIO direction From: Johannes Berg To: Rouven Czerwinski , Josua Mayer , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@pengutronix.de, stable@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Date: Wed, 06 Dec 2023 14:16:15 +0100 In-Reply-To: <20231206131336.3099727-1-r.czerwinski@pengutronix.de> References: <20231206131336.3099727-1-r.czerwinski@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 (3.50.1-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Wed, 2023-12-06 at 14:13 +0100, Rouven Czerwinski wrote: >=20 > +++ b/net/rfkill/rfkill-gpio.c > @@ -126,6 +126,16 @@ static int rfkill_gpio_probe(struct platform_device = *pdev) > return -EINVAL; > } > =20 > + if (rfkill->reset_gpio) > + ret =3D gpiod_direction_output(rfkill->reset_gpio, true); > + if (ret) > + return ret; > + > + if (rfkill->shutdown_gpio) > + ret =3D gpiod_direction_output(rfkill->shutdown_gpio, true); > + if (ret) > + return ret; >=20 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