Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2397259lqp; Sun, 24 Mar 2024 17:43:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZ3APvhzwnHrVaZTPkklmZTYnNt7Yp5pIIwJXXAiXi364baqMG91zca8p5MxZqfw6yUSPFcU1R0C1PZFrogkbunkKOFvYp0jmu3CdS/Q== X-Google-Smtp-Source: AGHT+IHWhopIoPWzhqiRAn1KrscTZlU9HGOAmWnHJTsXhJCFfxPppa6e3TrVOpXgHMpVMbxjv4Ts X-Received: by 2002:a19:7702:0:b0:512:fe25:550b with SMTP id s2-20020a197702000000b00512fe25550bmr3824010lfc.47.1711327412709; Sun, 24 Mar 2024 17:43:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711327412; cv=pass; d=google.com; s=arc-20160816; b=yEXFtCCogqkG7bs8dhf+glLKKEyCRNeh0upVvsGkbx4h6zY3JRRnTz1sEzfkAX/gvo Rq1ZcIe0E/XggWBN1lO5Ydkxpux2dHav0g3mk8VsCs3UHcaC0mf86oOiBVczEGmhDjop Ym4uqHv/Uv2zNimCa6K2PG33DpsjpgccKRv255Z4j4Lt9w33lLdxoRKNbB6QJEHac1Om OCOGg5/7ONCeLD4peesKJF3Kg9aLJSfuGu7/zvNNSOqecqykSR0HL1JAkKbw9iNojGqp QxJM0o7huee+l9XjSGVgIgOTo2iDSoVxoAsm33TuxnfnAMR3StOoKKFaWEQRBLx9x2/m 1fYQ== 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=SKWkLQKPWREJZvZDlXssm8Topr7m5ouxd9nkg4mYYe4=; fh=Fj9LSz1CdZASwic04VleXKruhHZ8d4uJOKSpe2IgDfs=; b=JMvqME3P0x9bdaWSBj4jmEsL79Rx0WghAVQxmAkQY/cK05j08mXhvDWYDR89TdPSt8 LTUJs82ClLCdeqG9JVcjObNQroJFidDdHImF8+lJq1eN7CnrAphk5d7BUz1XL4NnkLF4 Bbz1Lh/Z+PNq46zb9p/g0Idtix+AcB/+G4igiclbhPNgwzUkU/Hw/TWR1UG6mMPq/O/M Ktyx+vQrDJwcPCOIy5kFE5UHeb0/zcqkUyX3rbYsFrpZznRPdITSUBitsTB2D7/mahQm PZ2ZWfcanP8JRGW5zLsaLwOG9dAWrkiiGQT7G0dDb5nkoMLToA/5f2ihdSPfBRbuQckK 52Dg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UNZQeg75; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113419-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h8-20020a17090634c800b00a46c7a4b564si2020363ejb.331.2024.03.24.17.43.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:43:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UNZQeg75; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113419-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 6C4FC1F22CB2 for ; Mon, 25 Mar 2024 00:31:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 104091A83CE; Sun, 24 Mar 2024 22:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UNZQeg75" 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 346C713A419; Sun, 24 Mar 2024 22:43:40 +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=1711320221; cv=none; b=iJuPuQJS3ondjKQt58fwcuRydd7TQJsLSVug8nFdY1Gzp/8C3dixA3c6sg3NOBzN9v5+YFFfKm+kbFjiSp5unyhJAibSADUVpMrSC0wzBqnBs0ssXZYoeJ0+weBj19pIrOISYjacsXK+o9+cNxgK7HcjhW7sfR0tG64Bry1pEpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320221; c=relaxed/simple; bh=vXv6RwD2T4GSRX/k7xQwPN1CXiLLNq2tTZjiE206sV8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JT/GBqR0RaA66+gAW6Ex6VtrAgoAItBIyS+krDAGzwsRl/ibpgjkWrbDQk2aHMH8spYKNJLhZbOq7RDRHDHll/KCq8okqS+QoUXBATSAPh/XZfSa8CPKx0/VRMVBH39Ro00j63+hhHudzGw0soBvUgFSJS9TVlrW/U/b/ZoJaN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UNZQeg75; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DC1CC433F1; Sun, 24 Mar 2024 22:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320220; bh=vXv6RwD2T4GSRX/k7xQwPN1CXiLLNq2tTZjiE206sV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UNZQeg75BK/xzfxTmYUnIxqLoBvSiIvZArkOPVghAEdVFKs/PQTiqkRB/i2EoIoh3 og1yMxM6xqsj/hwtUjHArIWqKRuHxSQZLBhtzKZq4G2l6IC3Y8jHJFyDs6mTvZRhJu bqeJaz8L3jeeyo8F9EJpeVqc6fUIvxMe77QrIHFGCf6oVWMOjMpHeK60NjSG8zsIMa Iyt3qi3PXiHJx+e7xfb6t/HMP4ZS1jCFVvV4Nwdc3NRfZJ5evNolPbNBEU0KVn/uvK YF1XS5+IlrSULeQTeBAgQfgERevd/Rxch9/KPs8d3tzvErDQriiefNd8m0vvgxDZlT MS6CmDYVrqmog== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 6.8 528/715] backlight: lp8788: Fully initialize backlight_properties during probe Date: Sun, 24 Mar 2024 18:31:47 -0400 Message-ID: <20240324223455.1342824-529-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 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 d1a14b0db265b..31f97230ee506 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