Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2395661lqp; Sun, 24 Mar 2024 17:37:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPYPKqAlBOq5j1qOHr7Wu03jdsMO2UuZoQv16MIrJJSYxEgsOQRtxt0cr0WUm83xOXjum376EiJA1vLdWrjaTA9SUVDrJq1p7nP3NAbA== X-Google-Smtp-Source: AGHT+IFbLqxS/Xt6t56VcnFw740uB6W3UyHi38fmYpX16VFYCHeRqe3U7IOwzIc3vG5qF1i4VOt2 X-Received: by 2002:a17:907:2d9f:b0:a4a:20df:e032 with SMTP id gt31-20020a1709072d9f00b00a4a20dfe032mr1218473ejc.66.1711327064775; Sun, 24 Mar 2024 17:37:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711327064; cv=pass; d=google.com; s=arc-20160816; b=Ps19atU3iQsslQuDMSlS1EEK3xfZAYN7VFPBT0amC2wy3YreYwDMYky8YB9lpkwmpP YzWozOl6Wzjp7QWMkRsXLwpdLZJAU/d+vch8uOYoIWgE2jn7ds/LX1vB8aUsKvXHjdGl JbYrmoQ908IRllpJaJIoNnmsoiOYfO0fTjEDRttpYgUwYBAB5KkCl2BYBbAbwCnhLIhK VjRxTIxafb+T8YmOocTHSzO00bp19FmbTbREUGWHe3NApqDxiQE/UGWujOXKBPhhl9EY Lh3OknpqyX8YSU68dv9eULp1xc9BWfbwfNHX1Naf4PKPspIxBOV0FPQhXTKQ02sTbXqb ElXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ShuzbTVtjXiSe/GOQqBJfAyRuxxZInC3gyPSzTIwL/Q=; fh=Fj9LSz1CdZASwic04VleXKruhHZ8d4uJOKSpe2IgDfs=; b=DUknoYI/lQhA6txjB/NLEAlO/PsI+zLcOVZWZyksYsqd9JKZiQLXC0+Wl55ng1Tx5p pEpQiX3yDzpnFwDTT/8OxFjTCTj5w/xyLwhWCWgqP9n/xK6sbZoxCK5tSvSY+QZDQQnc bNDg1gky1m/I5W/ljD9khbR89n/scfGwAi+lakmAtMxknNRj+0AUsZiAG09kq0y/KUdR fDBYUVjpJap8ODLvbQFesWANad832TudeVUbQPy3jKu/mSGxYL+MPMBfMydHA45QWw04 gF4a9V1qGebLDzSNHJyDy+t8tarL4/H96n4PvxIxsh98/Bbsaap8CXY/LTl53Musr5qu WCFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TXgYaKmo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113417-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v17-20020a170906181100b00a4872002425si714571eje.453.2024.03.24.17.37.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113417-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TXgYaKmo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113417-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 158551F25C08 for ; Mon, 25 Mar 2024 00:31:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F87E13A3FE; Sun, 24 Mar 2024 22:43:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TXgYaKmo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61DBF6FE12; Sun, 24 Mar 2024 22:43:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320219; cv=none; b=sjD5GtJQJLSDatM4tF/wt5sNbicNVV3UuVTOH77ksDzxoiCUV82AACHEtt36iqp3/2W6al5p30NPIDpTTTKO7ySmf4HDRZ3aGeTnzJiWJGawafa/zFWpg97l4Mwn0V0/QPzQI6bqeaEujom8hvp1aIwT92vbptLDl0w3ZYKNArw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320219; c=relaxed/simple; bh=Bt3mk2Iwu3M4KY9cNK4m0RwGZAFpSKRjFzZ84cADfPw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OYEjRaKnD+RD2M+s6bgtcJ2jZgGV17VX8wG/Y6Zqhe+/XXFYdSEwP7BLPbRRBLNkmbdp1ZLr1EPAkCRNwm9C05vM//aSkJdXvFFIv2sZqz0SXoT/3a/C6nl7Rxn9itBv4Jkwru72r0wfS70aJJPsLgrXe9rF7oIJWnFUkYLgSX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TXgYaKmo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A47CC433F1; Sun, 24 Mar 2024 22:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320219; bh=Bt3mk2Iwu3M4KY9cNK4m0RwGZAFpSKRjFzZ84cADfPw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TXgYaKmoc9ON+FojKptZ1Yj6njmUO3duVaOz2MXjxi4f6kSupCnbQ/1mvZXKDcyG3 jDxdu+yOaQTHrJ5gREzfSVipqLBjpgxMlTPtwSbqFYmwvLASPyHdRWoTCQrS2EJVT0 F4roZR6Jo12Y1hSoeL1clD+z8YWIw3Pofm7CwZ/gysk9TuZt4RAMcVw+Yem/AO0Q0d ez+ZEFhGqL2MdW8QgrV3Gi3zeB6+A7clNDfHv0ibrY/CN89raEe9u+NSKDGWOG0pGC lEDRnvw3Gm0z4wDz988cpsgX/SyU2UDYaZftlwOiJint1PCUj4jKCB8BEeUzUMGPTQ GR2KBevHH2Yiw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 6.8 526/715] backlight: da9052: Fully initialize backlight_properties during probe Date: Sun, 24 Mar 2024 18:31:45 -0400 Message-ID: <20240324223455.1342824-527-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Daniel Thompson [ Upstream commit 0285e9efaee8276305db5c52a59baf84e9731556 ] props is stack allocated and the fields that are not explcitly set by the probe function need to be zeroed or we'll get undefined behaviour (especially so power/blank states)! Fixes: 6ede3d832aaa ("backlight: add driver for DA9052/53 PMIC v1") Signed-off-by: Daniel Thompson Link: https://lore.kernel.org/r/20240220153532.76613-2-daniel.thompson@linaro.org Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/video/backlight/da9052_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c index 1cdc8543310b4..b8ff7046510eb 100644 --- a/drivers/video/backlight/da9052_bl.c +++ b/drivers/video/backlight/da9052_bl.c @@ -117,6 +117,7 @@ static int da9052_backlight_probe(struct platform_device *pdev) wleds->led_reg = platform_get_device_id(pdev)->driver_data; wleds->state = DA9052_WLEDS_OFF; + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.max_brightness = DA9052_MAX_BRIGHTNESS; -- 2.43.0