Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp515499rdb; Thu, 19 Oct 2023 10:36:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSJatYcDvRqJt8pJLo7VyVL7xN9jyg4iT1PSOJ4+jRMFXfNvVV7vZD7wGBGTIe5MvogTC8 X-Received: by 2002:a05:6a00:1743:b0:68e:36b1:3d7f with SMTP id j3-20020a056a00174300b0068e36b13d7fmr2945682pfc.18.1697737002303; Thu, 19 Oct 2023 10:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697737002; cv=none; d=google.com; s=arc-20160816; b=zJt91vqzAEoXB324sMDFP6L85wxcOtgj624JgCMYGZlhCnuFSDmTC1dx0apXvYwOZV 1B1+vO8btMpTWP8KJlU9vplP1mCNwOuHXEZFZRxO9XYsD2zCk42UwNRL9Te5WGpq7y0r sVHAL8/9YlELnDmvK8zF600Je8kMkj0TNo0smHd+g04/sFQRb9KWupjzI3L2+Q6nPbHW 3Q4W/bKikXA8pcXulQS7DIXbK5/EOwFEb8MtxNsfEJf43FmoAecUgyCs6gGs1V63t47L Xidz0vOTLuhcfrHvuY0NWxU818bXiNle8gq+zKTZoq1lEoW2FrLMD6Dt81FZWXURc5Cg bcWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YMKoKR9mpYuWm1Ue6hyW2OnCpv7WG9T5uvYX281UTIk=; fh=7/omDlK7dosONq5l8CePi/uH/LZ0eAviv1Treoi9wLU=; b=DJMKlpEBtUc/rwZu/CDTJIQnPMLnbMTD5Qs8ky6h6H2KfcWyir5gZ/9y0u7h+mpWRa +SJMMuoysYAuvQPWHh7j6W74gOX2RaSaZX3ASf3XTpsOPkXhcwaNVqWGbqkxqJ3RY28D 5rFvvK4JF3/oRhcyT+56R7aiyL+zTPhuzyyT3gMV4l9CmKwYy9AlD8oWhdKKDFhaRHXU DmaZON0W1Jp1V/z1F/719vivD9/FZIqVJh+lZxzC/FANquo7D6Be8g7/ff2cylH9wdwl fzSMEsCMdg92mVa9jw+i5uBqZGbcf+ZTQAxlQ0veBZXS0iWe1NGvh2nkNo9E2a9opUnn C2xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Oc8uynhB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l69-20020a638848000000b00573fc6a17dbsi44314pgd.435.2023.10.19.10.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 10:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Oc8uynhB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8AF9F808FBFD; Thu, 19 Oct 2023 10:35:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346331AbjJSRfO (ORCPT + 99 others); Thu, 19 Oct 2023 13:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235499AbjJSRfJ (ORCPT ); Thu, 19 Oct 2023 13:35:09 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 619A7138; Thu, 19 Oct 2023 10:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697736906; x=1729272906; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OK+wrv+DMOQXPBESi5xHEfknrZptJg8C/cIK0m+tQ50=; b=Oc8uynhBrgzTo2ujIVSkfTn6dxW8SwfreV1tEfMYV7p0WXwm1QR6/bl8 lFIzSo9bBeM+K8Cz7dDJ7eScjN1rdclmkqjF5ToNQV7zLpeH1xOjdkKRO 2m4Ayhml04s2j2qpBRdd6BWE+I/XC1uxspe0F45SVEjlbLi/ZK4pbCv2y 1dCaHwvalGBNWtSPOIs588KJIJVff5ZZ2uiZGvMYhH3CAgTCL53gpdIx6 wmKyVX/R7O0v4AetmQoT6hYQ8CViftb+VvW4pilX2N8k0uVZGNegvmUj/ XX8BE7w72RlbtDnWC4fKsZrHdku0qMrFS3iAyVI+c4GDEPI9JTYxi7jHr w==; X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="389184246" X-IronPort-AV: E=Sophos;i="6.03,237,1694761200"; d="scan'208";a="389184246" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2023 10:35:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="760723566" X-IronPort-AV: E=Sophos;i="6.03,237,1694761200"; d="scan'208";a="760723566" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 19 Oct 2023 10:35:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 47B19F4; Thu, 19 Oct 2023 20:35:01 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Dmitry Torokhov , Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Bartosz Golaszewski , Hans de Goede , Ferry Toth Subject: [PATCH v1 1/3] gpiolib: acpi: Add missing memset(0) to acpi_get_gpiod_from_data() Date: Thu, 19 Oct 2023 20:34:55 +0300 Message-Id: <20231019173457.2445119-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20231019173457.2445119-1-andriy.shevchenko@linux.intel.com> References: <20231019173457.2445119-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 19 Oct 2023 10:35:44 -0700 (PDT) When refactoring the acpi_get_gpiod_from_data() the change missed cleaning up the variable on stack. Add missing memset(). Reported-by: Ferry Toth Fixes: 16ba046e86e9 ("gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes") Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib-acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index fbda452fb4d6..51e41676de0b 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -951,6 +951,7 @@ static struct gpio_desc *acpi_get_gpiod_from_data(struct fwnode_handle *fwnode, if (!propname) return ERR_PTR(-EINVAL); + memset(&lookup, 0, sizeof(lookup)); lookup.index = index; ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup); -- 2.40.0.1.gaa8946217a0b