From patchwork Mon Oct 19 16:06:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 298804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 433E1C43457 for ; Mon, 19 Oct 2020 16:06:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CCA8D222B9 for ; Mon, 19 Oct 2020 16:06:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="Z3XfwT1a" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730552AbgJSQG2 (ORCPT ); Mon, 19 Oct 2020 12:06:28 -0400 Received: from mail-bn8nam11on2051.outbound.protection.outlook.com ([40.107.236.51]:30081 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730320AbgJSQG1 (ORCPT ); Mon, 19 Oct 2020 12:06:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TXqS4D4BH7CccWuKtmfPzTGN09y8hAg1RL2EsbwhTF1JMdETHNpDFk5UBrB/PsPbos8FUPx+QqR1L5hlFfhaLNIVrJbQrIzARrglL8v9h31GA1zkyxijZv2g6hFIQ/csdU3L+ElQw5Tb7yWUq+cSbjC4GssT+hArDu1KffEQoFk8OVH3gFV8Wl9tZq5/hfVR3/t7mM+qOpsObYWL7qKR//SV8aA+DrkIxzUrSQMRJ+bI0UqnD6XNLx3ESQsYal/td4wmVWDJ0nFom0hxl4gsn/hEUxbY1w/dbxkjUd0ROTYDeygzOoKgXuD+68EE6fnmEii2hDGGFXYQHL97JdWtuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Co6dGmH4SD6AAetVLlUR+nXTWfolf7Say6+3lluM7fo=; b=Sd/YnsmNKQvmMaNMpe+5CqaIqUIYDQCh3Kaf3Rtx2qeCpEKPdwvbfuNLAsXZXuliJ3dC+cBKLR21biqMT5X/DcGXECN0PKsXo8zLkhcMlTeLg42YZW5rEwdnX4xdQPMfqBP+pUjqvrvibgzYkue4PqI/Dkkhob7/7Xa1ld8sZTh/77pmpoguw6jnK3IwMEWDmjgdA2PdxLYwxUnrtHXS0etdFQbDE6fTlYe02Rg88oah43eSIVllPwCsNQgzCrApeBKtT+MGb1Yo2eZTW0C+2TLrQEqi/VofuVeQVvgtM8XBn27o66lixGouBxEdzRRzxgr3e3s//2qJWKAO1tDNbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Co6dGmH4SD6AAetVLlUR+nXTWfolf7Say6+3lluM7fo=; b=Z3XfwT1aM5FxBM/vZWOXIBp9wcq+Ky0YDXKHZtFEVLlKnXgI40frkGr7jPsF7zYKV/e70dTWqo3sDezEBqznFmGh9qKhWEzJMPSSxEwtgkQIjB475S82uivNLkmabfl4/nsSHBu8wW69zcpfhTB14nQ0B32/6J4HpFSGnShBtD4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB5129.namprd11.prod.outlook.com (2603:10b6:806:11f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.27; Mon, 19 Oct 2020 16:06:24 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a%5]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 16:06:24 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= , kernel test robot , Nathan Chancellor Subject: [PATCH 1/2] staging: wfx: fix use of uninitialized pointer Date: Mon, 19 Oct 2020 18:06:03 +0200 Message-Id: <20201019160604.1609180-1-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 X-Originating-IP: [37.71.187.125] X-ClientProxiedBy: PR0P264CA0225.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::21) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (37.71.187.125) by PR0P264CA0225.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Mon, 19 Oct 2020 16:06:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15ebb35f-f089-47fd-2389-08d87448ed77 X-MS-TrafficTypeDiagnostic: SA2PR11MB5129: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1284; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yyyObbQxzjw5UpK42fAOHCoIDMokRhZBcTjf7vhYSigi+Gty936kgsOTGnM7yRABPksGzxROYaZW1KbfLIsPfRFN6RO6JlgBv3Sea5fMajNIkcpaNrka9IwWK3Qx2J8/JvXNpV/8FECJwtsx1stJh6uPD5/7lIS9r9mdO6gyEBr5RwttmPeiR3f21soi3bvtGddAaSRLp3sYC0PH0YsJzMInA3UoKiDXQA2QNMafYfORcT9092FZWfhqydOlBLOIg/WF9scD6+p1AqrsPXgMJIjZy+TDnOfr5ViqF2LiWLqXG56vMa8dySMQ3m6ILdXk X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(346002)(136003)(396003)(39850400004)(366004)(26005)(8936002)(54906003)(186003)(6486002)(16526019)(316002)(478600001)(8676002)(52116002)(7696005)(6666004)(2906002)(4326008)(1076003)(36756003)(66574015)(956004)(66946007)(66476007)(86362001)(2616005)(66556008)(5660300002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: XG440Te/cMYsrd0DmOHwgF5/hKgmxUvoGMMZ1eFV2vnqKD5EbcshZdu59XTY16VsTtIIJPKHFUa8CyXOwl9uOLFPtaYbIKf3T4Bq1f/DFBUcWjrsDsFrZuRTMfq/HezA0PEqjsvzgCEtA+TBbN+aNX/W8GBCF0HpHJ+t8JV90bEIZOI+8yOfNDMZ/UWCas5lUqNpS+pHyBaoA3oy+sMe3v2AepxrCMUvRA07aWESXINcCJHZKy+NZE0CWybwH+SGbKB8oX66teX6d1I+DUda6B3xqhRG0oFsfE8mmTXgRjB9zznnYEVrx4KUoPcVH7N1HvVM5AanYxSnXoFkFiQyd7CCPU623WHDgSTNeXFVhXxSKVGFSPbd5C+TI8KUzWPRnUlgCVm6nTAwipLEnRaLj1gLRvZKanp6A7qjrmlUwRDMn0iobrpd4zqSvzJ3tkGVCL+hRvPW8P8e7cPL8KAuf1FmRHB/X9qqz+ZRKFzNSQ64m7W3UzIXMmne1vLruCJKl+J+43ey737GUtKbLAbFomumuOx03hFCgXkd+nvaeWaNMkjoo4sME5U3FKv/wICXVzP+B2MH5sjG7irKsikrM59Ocyv09jBuK/AhY6PrnINCV8qghgmlYwhF9z7hR7abl+y9HQDxDNbOrxA7iI82qQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15ebb35f-f089-47fd-2389-08d87448ed77 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 16:06:24.5649 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F2fpIke7WEJN9xGDyCOCFhhTWIoFdu8a9HNlSaz2f8pFpe0ZpJiD1XhcqXj1EkVfzeWGkIfEK6zvYgYH98eOuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5129 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller With -Wuninitialized, the compiler complains: drivers/staging/wfx/data_tx.c:34:19: warning: variable 'band' is uninitialized when used here [-Wuninitialized] if (rate->idx >= band->n_bitrates) { ^~~~ Reported-by: kernel test robot Reported-by: Nathan Chancellor Fixes: 868fd970e187 ("staging: wfx: improve robustness of wfx_get_hw_rate()") Signed-off-by: Jérôme Pouiller Reviewed-by: Nathan Chancellor --- drivers/staging/wfx/data_tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 41f6a604a697..36b36ef39d05 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -31,13 +31,13 @@ static int wfx_get_hw_rate(struct wfx_dev *wdev, } return rate->idx + 14; } - if (rate->idx >= band->n_bitrates) { - WARN(1, "wrong rate->idx value: %d", rate->idx); - return -1; - } // WFx only support 2GHz, else band information should be retrieved // from ieee80211_tx_info band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; + if (rate->idx >= band->n_bitrates) { + WARN(1, "wrong rate->idx value: %d", rate->idx); + return -1; + } return band->bitrates[rate->idx].hw_value; } From patchwork Mon Oct 19 16:06:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 288321 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D32C0C433E7 for ; Mon, 19 Oct 2020 16:06:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64BBD222B9 for ; Mon, 19 Oct 2020 16:06:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="kES9jFkF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730607AbgJSQGb (ORCPT ); Mon, 19 Oct 2020 12:06:31 -0400 Received: from mail-bn8nam11on2051.outbound.protection.outlook.com ([40.107.236.51]:30081 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730190AbgJSQGa (ORCPT ); Mon, 19 Oct 2020 12:06:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vtu/45nKEnYXNC8dL7MYWMtkvw1aNwn5AxMg+3eWP7LERcIGwvKQeAVIYM8+Az2sxxSPdnjQGeUSCb3GdmKjs31WFO3wy9ZEk8VjNAejPd6v0mjsW9Cd3LCy1tGqplxaBIgu+nHpF/J6iwleyooavHpVSfxlanarMeEmkPTKLdxGEMZedKWywlnWuek9VFXYd36kRNd7NFGi9tSJzrmian7xCPK2oTotm+aqDoa0Idl9lbH1hmJiYewRZv1KIhUGebzeR6USE3P014O+7MEix+E8rrqU7O6SJJ6HohUB9BNgYhtpNxKZPYFtWaA04UZycY6c0dphNMtALguxG44PxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OrVmGnYd1sTf5Jfe5yYrsZWrEGpwvZpR3asYJu/1aNE=; b=CWvz7/Xp8uHldkTN/kSp4uFQcqCANDO2lOkz8sstl0w5ALr92r7tDqzRBUVtWQcGc6b3m+yeK6vEgMxm/u/uTWL+IiyAOPgYuh/cCa+5mg1LmEzlLjB0iQiX0f3nL9AO/F/Arz89hoJJyNvz6UWwaiNKVLRho2WiQJ+DOFUzjKtWmejiSdg06XmDNXzrdvVkDzPFEBjffs1ov/446tW5BOlPKCmMlWQnUdhctmgrgFr8+Md1DFwF/uoITZsEuiV2wlEvam63w1xbz0gqQowkzGnO8Txa+kxZBHyE56ls2Od2r2s9M8zyKdlhdqn9LEBjNQ7UnklrezewiuY7/6hDQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OrVmGnYd1sTf5Jfe5yYrsZWrEGpwvZpR3asYJu/1aNE=; b=kES9jFkFWLjZLl1mA1+gznyL1yA9Zq5DMPTyBlyCZv8wg9S+z7gM8+xAym/gUAhZEvd6jX7Y6tnA8mfCNz5l4DTFzAVSldk2t9dUlFdU8ECh5XmtkJEluav3PAnjYZ8zxmf1lqJm/rDNfpI8wXV8xPyiBsKKIgLwdVy8PHVYhuM= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB5129.namprd11.prod.outlook.com (2603:10b6:806:11f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.27; Mon, 19 Oct 2020 16:06:26 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a%5]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 16:06:26 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 2/2] staging: wfx: fix test on return value of gpiod_get_value() Date: Mon, 19 Oct 2020 18:06:04 +0200 Message-Id: <20201019160604.1609180-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201019160604.1609180-1-Jerome.Pouiller@silabs.com> References: <20201019160604.1609180-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [37.71.187.125] X-ClientProxiedBy: PR0P264CA0225.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::21) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (37.71.187.125) by PR0P264CA0225.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Mon, 19 Oct 2020 16:06:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 686f16c5-60c3-4945-cf2d-08d87448ee87 X-MS-TrafficTypeDiagnostic: SA2PR11MB5129: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:206; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RakpDgJU9cOwW+mx2NQWfz5tCigeUJklOEK0FhYQEsdrxSv45StUjgQHHJqvafQQVCO2EP3qPodSd+8fLz09OnU+BGtsb3o7wZeWlDTHjVZFTU8C67wAjT8mpqhHHNC1+Y7fOA0Lm8PIH29HU9jNcI4e9tuByG0AC1xiX9b0ePqgHCVJ5qfgD/ZfJedaaLqC8+diWBgprfGJijSOqt+NaX8lbmpBdIT0FUVNeS3ZbGt8bnTKDkhpXmtLqXJKGKaIy8oh7MLUGsGhvn7kGkAuXlb9SadSYEcXZrm6kvrYVdDWK59ULOOzD3hOKgXJknmQ8ocnA1ykP/SOefxnAFTR5g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(346002)(136003)(396003)(39850400004)(366004)(107886003)(26005)(8936002)(54906003)(186003)(6486002)(16526019)(316002)(478600001)(8676002)(52116002)(7696005)(6666004)(2906002)(4326008)(1076003)(36756003)(66574015)(956004)(66946007)(66476007)(4744005)(86362001)(2616005)(66556008)(5660300002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Uj5FAja5K/gFPmFDRj9Kt4H5zfOLaKp+JONmpobPUoXSEAeIX5RfdKoLbVqcGq1YJb5w27j11tnpJXcvBJWLJ7GzZ9vA+qF9W0x/fHijVUl+u7q2VirXaBuQz9C2GM8oN7n267rKeRCLoj2KV2EQD2imU+C+VFyiMz/S+ELxgUuSFi6E0s6kuANXL/1BH7Feyz/Z/KSznUi6w1CFPb8KlmVMpKh0LjnKVRnADUI4HG6kIUSOPaJW04MkwWfl6wm9ipEGpxO22Q68btZGOodZbuFDT+7wWwUY9wEc7VKutW98+XsgcTKtIzBsr8gJ2MG/Y4H0C52FYvc5ikUyJeYcCamAQaQRFXn3z65bjPOoIyBehqfKLnlcNcSHNXTABeMv5wUE4xdDHHzII50GHK9jfnEmlK1t20Rwe23j/2rfC/Mzq/AkZ416HeuwycYkDNn3LEJpboeZzJ0pB1ujccnvo2mDr+Y8pX6P+lbDoIc7R43vVaFirO4cB0pLK2xy7V+7544qFAvwQcar8IjpTD2MGzR2/dZwvGyY9thamZy4V62WQeYU3p5hA6p1X2YNICo9rdCwYit9fZeonMS8NyTW5TuBM/NxUVcok/T7S4daJvewscgyHc++5/VpdcASswiUy8gGFAufdyHABRBzRrtIdA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 686f16c5-60c3-4945-cf2d-08d87448ee87 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 16:06:26.5158 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w9LV7wHm6DXIYACLpaOKRGFqSHCiEs4rFeFq7mbddphZuI6m3r1jdLGwVJCJMoZNDrO2R8HdDpOjLt8U53w2Gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5129 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The commit 8522d62e6bca ("staging: wfx: gpiod_get_value() can return an error") has changed the way the driver test the value returned by gpiod_get_value(). The new code was wrong. Fixes: 8522d62e6bca ("staging: wfx: gpiod_get_value() can return an error") Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 2ffa587aefaa..ed53d0b45592 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -21,7 +21,7 @@ static void device_wakeup(struct wfx_dev *wdev) if (!wdev->pdata.gpio_wakeup) return; - if (gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup) >= 0) + if (gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup) > 0) return; if (wfx_api_older_than(wdev, 1, 4)) {