Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2527240lqp; Mon, 25 Mar 2024 01:12:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZ42eIxX2m4SZFZYAvH+G746yumFL9McBSDL0C/Y802Es/ZMXImMMRc+9y+E5VGAbGxNj5XFDpk1ohoEPD8ShfC6sd0G7teUeUrsBRFA== X-Google-Smtp-Source: AGHT+IFrWSNdeOkPBmO6SAxo14/m6buMj5nP3ifa5cbqoa7o0NIai//93FvckOTWOvNl7DGo4KlS X-Received: by 2002:a05:6358:7695:b0:17e:f3be:5c0d with SMTP id e21-20020a056358769500b0017ef3be5c0dmr7338821rwg.15.1711354320103; Mon, 25 Mar 2024 01:12:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711354320; cv=pass; d=google.com; s=arc-20160816; b=psyv0FmF8HtG9CyttK4oQbo7iiyaTzGypTpPoqYPbWWv5bsxn26eh0GraivNWbptWF 7QO1nyiYoGg8WqVlRS8GBAVYheTGyaLJHZuaGQhsbjKnS8KvXEpxVLxk7wRYqsqJaULA ACi2/uGnen5+W+np6hCmTd0bNuQTs7orgVo0FqK9bUmJVn+Eg0evZlqYF0H0kjfQLvFx zei40d9LQOSERRVcxp0PLWChUKOagm+PtxqKfLIkptdYafK9rKVW+adbP0XgOdIf6+Tf OPE/XWqByIyUkutiBi8dHGzSJ/0GOcYnhzgMjYD/HkHHCnMZnK0IbHMnr2/UPTqwKjor 0uCA== 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=+asXG5SY5esNu/82/0woIGIPYJDYNAmIL4bfBokF+14=; fh=Fj9LSz1CdZASwic04VleXKruhHZ8d4uJOKSpe2IgDfs=; b=amWVbFOGrY3dwEa0b8UNVqGjcC4CSqUqiYXoCuYWb3JmVUSg1tdGPtDotDQriaivWP q8vziZQ+6a8k9RxFY39mVPFaDD7z5ikgQ8cFh54NG33c2g8vbYRY5SAVeEb3gO7tsTvh 3mU5KKd1BfLQIs6mKTPY/WkR/G5jo4DusnDfuinijAAXWrVy4lI/oyrd9RI6Q9U24DDy MgE2FdwLLw7Rq2sDWQghlUHzF49ndATYY6gRfLkTArfaVW8/SPh+IifG00oaUGZbXywS l/evXm4szJwgU55TZ80ec8Rn1kM7Yy6vfsQ1A0a0p1HEiql0xxbOXeCoLJYdybMte5L4 Qk6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iTg8WirP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115970-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r18-20020a632b12000000b005dc82a6febesi7058447pgr.153.2024.03.25.01.11.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:12:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115970-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iTg8WirP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115970-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115970-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BE62028B64E for ; Mon, 25 Mar 2024 08:11:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 182A43949A8; Mon, 25 Mar 2024 03:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iTg8WirP" 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 2FA9814D426; Sun, 24 Mar 2024 23:17:38 +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=1711322258; cv=none; b=Ux1U44AgdRhvg7Oe/sxpvCmGDxGmUgxajwAJgTSfIXjaSCdvdKW3xYgziRcuhiT+fvCPmXYzsGvl6JR3aR67iQkmGzen+UQwaefS/FvejVWuMnRXPH8PODzfRF5bd9i8wPwvGd5A+QmHygYy1kQ/y90/Y3lkUE80e1Kc7SJz7IY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322258; c=relaxed/simple; bh=3seKHVoN8/gBs3/qRcJQnELvobzcetvAIc5iZRBAZi0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KqUy9p/9uLUe69L0aaEaxSM7iUyBhQtNDxCv9Id0vB84BnJZGWrgebzj4XU6BSJnYXG2FqEmkk95jWeHlAtzbRCQ5yjnI36ULG8zO70NbY7ugjAaO3hSDuL6GyAAsIPkOrS4BjarJVOcqEPjmG2LDZogJJRvmJMovn7resK8hg4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iTg8WirP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57057C433F1; Sun, 24 Mar 2024 23:17:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322258; bh=3seKHVoN8/gBs3/qRcJQnELvobzcetvAIc5iZRBAZi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iTg8WirPdXLb0A/+CIRJNQbnbqIrlus2yfcO197thunajERTF/2UEC6ym0DAlEyfP 3ySuMlp/WmemkaZEqFEqWFZCvth/1aoVasvWypQkVtAkwa+xKCdWOOcBD411M66NUV tQR/CIs6cE6vM6Oaq1o/tBHPRZtS15cUr/RpB4dQablkOdd8K6av4Bm/652pMZjtYr UHFEw8ynfiREhW67VXy3oz1rsNpZI9a3UG5r5qjQ8svXgSQ6vErES6ei8jVjrOPX7n 8J7pYecmHtq2angb1IjN9KobJ4WOzNVLIJEpqei7m5GPuBWnAlDUjJgb0PdrPUhUgx 1ir47+QoZIiRg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 6.1 340/451] backlight: da9052: Fully initialize backlight_properties during probe Date: Sun, 24 Mar 2024 19:10:16 -0400 Message-ID: <20240324231207.1351418-341-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 882359dd288c0..aa00379392a0f 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