Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2622084lqp; Mon, 25 Mar 2024 04:52:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVaue6R3FRsD6jLcUV5sCECL+zdiBuc6+lqYdHTa8VyQ08K7ofGduSEytN7mSYTEo332fX+TWGUc/bXVQ2dDzHolWzG56TgV2u57ZCOg== X-Google-Smtp-Source: AGHT+IFi42AV6o7IgsOhTuC45qXsRdgn6xYdwTxWq9oMgWldrPO88Htqkp9aRG8ykDBCckLM+vac X-Received: by 2002:a17:90a:8998:b0:2a0:1720:f5dc with SMTP id v24-20020a17090a899800b002a01720f5dcmr6269555pjn.9.1711367567437; Mon, 25 Mar 2024 04:52:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711367567; cv=pass; d=google.com; s=arc-20160816; b=mwceoNRq7nwgEOlaApM++dK8ctjGpicKQtt85kiV6hVf+JovqQOejm9YSqXQi3Wye6 iHcIxiRbzflDRz/HgCD5l94W7blzOuh7jBLTl+7S94U5nrySukDylmnS6lfyl8+dkgLP C25tBQ/cQBRwVvoYy16XMluxUlrlELtPuYbj007od+rJI090PeXdV2Q2gsfK5tu5gZXU 2wE0qrypwUOLfiJu79+fxzFPEAEyVSr7RnU7WnDiz9r8X13AExX5IeVLWQsblTqDWvir cBi1dyKTz0lij2zWx9hrFgpYDLF1AL078f59X/DzFzQGtyLmdfdRSR/o139BRO9lNQuk 0DzQ== 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=/+GxKHDwHcpGedYLLEpYPYr71UrN4SWzan1Sg7hz0jg=; fh=Fj9LSz1CdZASwic04VleXKruhHZ8d4uJOKSpe2IgDfs=; b=HsYIf7yIcGmCGwEND9sZrkl7QQktvRXL8sG1vepUC0SbQE/efwaHfEuE08LaPG21lC LGuEX87VHlVwTiQkCqWEq+WBPMEBpa7KtHP2N+ZgoMxzrnfL91ABOj4Bn7EqIsQYeG76 nEQrxgel8zzwQecg3gYG+AMWc4HLibqX76t8EA3+ElDGMgORsqAmUkFyfnlZRrB31BBW qdNAnjvso9eUjBtGXmrM4Hs13JdkUOWXmTeCWYZSXf0MSbgsO8HbKEbayFGbm8dsn2w0 /dxpylIhZcETMp0ti0b7//u1XZ0eS1Bmq8tW04Waj4FeMMH4ypIegx6CV61LChq56ivB sQrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BgGadleE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116200-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 b6-20020a17090a9bc600b002a042386389si6031468pjw.83.2024.03.25.04.52.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:52:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116200-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=BgGadleE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116200-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 E0D7C2A6586 for ; Mon, 25 Mar 2024 11:44:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17E70290BCE; Mon, 25 Mar 2024 03:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BgGadleE" 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 00E6617CF5E; Sun, 24 Mar 2024 23:43:28 +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=1711323809; cv=none; b=iVyykKCy7RfbWt+t7qRQD3VMA9xlWHhfm0sFnkmYdygrhW6v6GJbzl0C0OoIdFaAd35Fp4eBHzKl9Nwc/0H+utXCa4he0Vw1BPOB9Hz+cu4Ots7VkPGQIuijeSs7IoDVdJV3X/Hm7dRGpbYWl6FaSllEEkm3QFzAw7/HCoILiXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323809; c=relaxed/simple; bh=LYhPIjMpKEPwiaOA5bQCN6S1WNeGsEIjM6B9l315d1c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F/xWZqu+xajfOxLtEJws7q5a9unvqFplwY87VIfslLCG2Pp7U2yhpXuxiEK/XfGG4T3CeuXWcftj1KTavF/BAKMYLp3d08EE8kkBq6oodiZ/itAaZmV1giecP+hINsI6lnfvGS0EW/d+w7LmzB8cDbIxeRe80ghudidQyEizdvo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BgGadleE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43B86C433F1; Sun, 24 Mar 2024 23:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323808; bh=LYhPIjMpKEPwiaOA5bQCN6S1WNeGsEIjM6B9l315d1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BgGadleEUqV1I8C9HRERFC9+BcsS5f3quA4iIZjfNTnmgMQPQECN2SAOix/yU2/fL zNw99L1cpvbfaSxBIIT/Vc8SkgUYfyZTVbEXQ7g/B/2VPtcotEeT4iH1S8WZoU7cbY kwzIKbiGYKeuxbvryHJA6K/bQmVF1qFUh8CuqwocP3GjOdJ4rHOPnEltZbBb2ZJsSv 5OZGExUATYEBd1Oi93Myn2OhGs0OLNHnxtL0jDDKHP5wO8rk0f0keWL3LMcU8vIXdg rx2lO/DriFAPHEcraQKwC7I9NFTm7Y6flisfnR4wlUq2BWppupPw8Ik1J1t/QMM6dT In1dPzNqLIB/g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 5.10 187/238] backlight: lp8788: Fully initialize backlight_properties during probe Date: Sun, 24 Mar 2024 19:39:35 -0400 Message-ID: <20240324234027.1354210-188-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 392346827fbe8a7fd573dfb145170d7949f639a6 ] 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: c5a51053cf3b ("backlight: add new lp8788 backlight driver") Signed-off-by: Daniel Thompson Link: https://lore.kernel.org/r/20240220153532.76613-4-daniel.thompson@linaro.org Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/video/backlight/lp8788_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c index ba42f3fe0c739..d9b95dbd40d30 100644 --- a/drivers/video/backlight/lp8788_bl.c +++ b/drivers/video/backlight/lp8788_bl.c @@ -191,6 +191,7 @@ static int lp8788_backlight_register(struct lp8788_bl *bl) int init_brt; char *name; + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_PLATFORM; props.max_brightness = MAX_BRIGHTNESS; -- 2.43.0