From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796504823; b=fRBDapok6YSAQFAdPickOYD425LR6yRY40hu+/sOcICYy7+KNLat2p26r5xAGA86UN2q /OhTPyKLXvhYTpV+EppDhpk+hdFHLB1+F1YYBOJLUVVAUUHtir6dHtYEyHDLyUuSRq1KK EEy+wPFS0SHNC0AFHPC9/iF6gPYtt8BcyqzZhnKy4Uy9JmVffJoYthV7BENWWXbkPGgB0 +ascl3UuACCj5USj8lDx7BKGRPUoOy3n3p/7r2Ei70JNWFvTi+u07c807S9Rg86HTIf89 7keh4lMU+Q73bWs3bheHCd5aaatWxmcb0vAvWG9IIq8BGNsYapUV/T5Thz86rJFDxBw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796504823; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Sender:From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=q0KGwRYsqsg+52BxUUK5fVa2Pt1RBcgFjvRC8uW2DEY=; b=QkGONJghxKOulK3X7ghYqVmbqdznkplEc1k7CQOqjXQWw+bBS3hrV+shGYPNnmiPQqv1 WFf8DLQvIgAALra/AjE6hacJPQ6JFcMhgK37YJyVsyPUjVLUk4bzDCgC3vfOPDqb26d85 3C1vL55bigT06/pAXUfGK/z9AspYlxKTTmyLXrEkyCFE836OtQ0VcOxBOB/WzXQpqXlZY /ysKWRHukXxVUn+W9ct8BcKn+0bEVWzGML8bTQ5RjTskkCEVnX+sFsFEc6/rWKv57UEq+ jDRmXDMXXU85Azug7xFGDAUo5C3VdDY0p64B7TZMDocaL9W8hYEwcdtr3tRVs3+L7ng== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=o2uQrY3Q; arc=none smtp.remote-ip=209.85.218.51 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 069C0606A31F for ; Sat, 5 Dec 2026 21:07:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 069C0606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=o2uQrY3Q Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-c505a0acbc1so15273366b.2 for ; Sat, 05 Dec 2026 13:07:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796504821; x=1797109621; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=q0KGwRYsqsg+52BxUUK5fVa2Pt1RBcgFjvRC8uW2DEY=; b=o2uQrY3QJyg9CwifgPeMuTX0Sxz+RKfjUO7uxxRngGxDJh+Q26JDZ2TkXeGMrYvKOY o/a8kAUakSbvBdsY4mvuKrPVYsiqRrH75XuMtOGZBTyMsJSLu9SFxC+Ys+9JNG2Ia5ec cWSoAGpg/iU4gT47aGdYu9zpnPyXmwwr+FQLh4R7XlvV4HVyf1P/fVY1FvnUXn1D6Idx rT8v9pFye/ye5g7ONRn1foKK/nutdjifsJT6hoQKJfxYE9/JJsg1e3+oa0SOb/xwQXtI Qijqc5QK3XYJORl3rMvYCtFWnSFmIUB/e28Hx3HlEgJqRvFWZ1eIqVmFzFvBjoSQz6sN Tnew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796504821; x=1797109621; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=q0KGwRYsqsg+52BxUUK5fVa2Pt1RBcgFjvRC8uW2DEY=; b=AUl8mTKQJG++OVvliN35WxlftJbmgDnFIXZU4LrfYEFFKx7RO5AwkotJ2t00LGv4az 1szzZEm2yWgXYIWA9op6i+WLFFlfcr/YjR4wD/3ybZVY0ran8ljjfQRaz0pu0RXp7iTM q89+WVUJ7g8I0JeEnV9PITxT7zZZONDKiJrMA/iw3KkNZwjJr8D/pY8OiZ5un4zT0SEZ 3iPTkkbq9f2diIKymS6N5ZAWPdJWYpsRJGlm7r/jtx4mRIGHh+cc1eNv+w0r5M5t21XI St1/EOym76bEYfVEqcqCGnDKP9PV19tXBnAMqfr+9ouW1AM05N0itIacTZ9zQKc8gkaQ rLVA== X-Forwarded-Encrypted: i=1; AL+hErEG6WL8iO0KZ32UK7wQTBm/0UfuxDBhXGU5RtK7NLGJFlin5R5ONGEFVYPKIpV1TFZbnJ7G5SoZSqZp7lg=@vger.kernel.org X-Gm-Message-State: APuU4Z+8dp51urP/5OZzCH4CjgMHVV3dchIEJMQGuOAEPoUrONDuGm1A XIhLWE9AYVhp9UKbe6YFVbzn3JjzmaN3seBwMachspG+6smZ8DmYiz9J X-Gm-Gg: AZFdTZdFu4/mwvDWbkKcE2TWGM74HSsUVG3m5rPXmuH8tXk9YW35NB6CYID3ZVzOj+N pQILOTLRkt8KawWX9dG7WM2LZ/Ee8YIGoBSJMOJt4oncW0UGNqwhf1vhgSYl4S4Bu7dhtPxcKPz Va/9deX9XldB4sjApwwgyD+BKqAt7PjHzMCLl6Gpl8kXooN12L8h6drf0AxGBeJRa2LPvzHvbOF gueyAkir26vkEJg7JD8dse5hibRXFfeeOAh5vT+4nxecXkFy105ebKqI7Hyp0XP+5K8sbvOgBQG GLZcqzq4V+/fX22JrNOmaWeRyKyH2DzOXc7TDIlp4JiyM6oilpjNvejAfiqI1gzdsJytVIE5cab qa27aSQpcX7CceyujH7Nc6uR+0YB0DaRKswQ22KbIyvZ/ovys9UcezWqjOEBHadJfwCHzLShplF Ml8q2sTgC2ZvE41vUbx0E5u1gdVgwzzlQ6o54DkzXdgF6DXd5sAmO38t/A7sestCuOwthGJ998A ldjD8JOePFfE/Yin1nm8TqBDZHbmcTLwxLXBuAWPUsM44oqua5R5xx7XJ0TOeHJkyfxDCUkUNvD U+NfIqPme2gSzLdaqhvx4uyYCsKkqJfNvthc7BH2VgIMkl7vLGoseVM4WpVgNEk1VrQCN5SJDV7 7fkCvVGnHjMMB3dj3VrOtNnejjrlKKOqckDVu X-Received: by 2002:a17:906:5911:b0:c29:4634:5c8f with SMTP id a640c23a62f3a-c527c4be127mr195714966b.0.1796504821170; Sat, 05 Dec 2026 13:07:01 -0800 (PST) Received: from kekw.tail0edbdb.ts.net (c-78-82-86-71.bbcust.telenor.se. [78.82.86.71]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c553fd43c8dsm65249366b.62.2026.12.05.13.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 13:07:00 -0800 (PST) Sender: Gustaf Bergqvist From: Gustaf Bergqvist To: Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Corentin Chary , "Luke D. Jones" , Denis Benato Cc: Armandas Kvietkus , Gustaf Bergqvist , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] platform/asus: asus-armoury: Initialize retval in armoury_has_devstate() Date: Sat, 5 Dec 2026 22:06:53 +0100 Message-ID: <20261205210655.231747-1-gurra.bergqvist@gmail.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit armoury_has_devstate() prints retval with pr_debug() right after calling asus_wmi_evaluate_method(). When the ACPI evaluation fails, asus_wmi_evaluate_method3() returns -EIO without writing *retval, so the debug message prints uninitialized stack data. The return value is not affected, since status is checked before retval is used. Only the debug output is wrong. Initialize retval to 0. This issue was found and the fix written with the help of an AI coding assistant (Claude Code), during review of the following patch. Fixes: f99eb098090e ("platform/x86: asus-armoury: move existing tunings to asus-armoury module") Signed-off-by: Gustaf Bergqvist --- drivers/platform/asus/asus-armoury.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/asus/asus-armoury.c b/drivers/platform/asus/asus-armoury.c index a9926c94eea4..721121982cc5 100644 --- a/drivers/platform/asus/asus-armoury.c +++ b/drivers/platform/asus/asus-armoury.c @@ -139,7 +139,7 @@ static bool asus_bios_requires_reboot(struct kobj_attribute *attr) */ static bool armoury_has_devstate(u32 dev_id) { - u32 retval; + u32 retval = 0; int status; status = asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, dev_id, 0, &retval); -- 2.56.1