Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2393855lqp; Sun, 24 Mar 2024 17:31:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUF6C/xEvBFMPAOalGPxE4q7/HpazReOTj19utqGBmYFIZcm5n2Id6+UpSpk4PToAMeHhXMsfLh7F61QwwuEssZEs0cNV9BAjE+fH8sA== X-Google-Smtp-Source: AGHT+IFghXpqzz1tnddWvig8NaiYg7aDfWLS9gaWpYOfB2+6qOSKiWeq2N7glxKt1AUfgqo3kKFw X-Received: by 2002:a05:620a:4591:b0:78a:280a:711a with SMTP id bp17-20020a05620a459100b0078a280a711amr7453989qkb.76.1711326704831; Sun, 24 Mar 2024 17:31:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711326704; cv=pass; d=google.com; s=arc-20160816; b=fr+KFoCmBRPGBku1xxkMI3VnsWliImfU6o6G3ZX9hMb3TPg1z3F9fzzfpgE/lbHCcu SCggndM6s3GVJovXUAN5G7209kRo5owPBFdNxrm9Ov90ORxN/zF8iZ011EtmL+bqfTOU GpNHcB0n5L225eyKGC7bqvXXRIY3XRj4RADz4HPfgTzDP0u3bSfVb+vtcsB/n0ogwV4J cX/TYjIGlSc95NubkX7AEXYVqcEUlPRuBBROOPJnk/YMjiDda2yDrDtZjIO+Y2sb+zYF VL+9jQotXaRusLC+DRT+SWfP/tQY+zNhoqX8f+vMcsuc4atFUg/aax18XleECHo6ckP3 +MpQ== 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=uLE+kFfcGRvp5JQm50U25Bxr+6GCw7LahDQHOja22Ag=; fh=Fj9LSz1CdZASwic04VleXKruhHZ8d4uJOKSpe2IgDfs=; b=aPJVBLxN7g6kohj5DK1Wkiih8w2QN/WNclxHWGhtgr4mlXllvGpGXhDU5Oy5EX6b0j kSMglPOZa2E6TemMaKy2JM23aXJN2DgkJgU2jZA59d46gyN1qwR2MBDyuE0eHqWIK9DV lKHI5N7trN3h9BciqeQrTbWksOYaZ7mlfuwsABpGwKxjDYY+GP/hao+TOf+giGfquk75 UoLHwtWldgkZFJP/uN6mg0KahOMestVc/R2WAroz702YnrGAtGH+vjBzDNuTYw/0RKjs aMRmr5drWo2tkvEryXyuUbG7vb9iSXkA/Oe6R0oSOdS1h3+GBvTVXHNuYV721AFKusro M2dw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nLlhN5aV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w13-20020a05620a094d00b0078a35081780si4464665qkw.546.2024.03.24.17.31.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:31:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nLlhN5aV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113418-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8C9C11C22161 for ; Mon, 25 Mar 2024 00:31:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4492713A41C; Sun, 24 Mar 2024 22:43:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nLlhN5aV" 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 4017013A3FB; 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=1711320220; cv=none; b=lz0k8ctY0s9LG+aRdZi87kwjZOUhl6QwxYCc4fEstkpIP3PJBLfik6QSWqKQ/ck/0cbI9yXhjJGivC3BseO+B+DIYcs4ckLXZwktdK+XHkS8k+H3dguY7Gcg7yznniQycI9AVKDcRDK3CvkX5+zcYJbn0yDX4FDIPAVRsHYJESw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320220; c=relaxed/simple; bh=4PlkdmqB6yZ6noXjc3qFkk6SADhbWCGGBO9b/AhRtr0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Es5Iqf0NbnpCJiI3R8rLq5BHLI8RuE68Ow/sjenyWh9GRoeTfKvXJt3SvobxSBdaoIz9Kko3pXIEZIrryeQakQ7e3RIZ6xJxfo6CmUoPDZbQF5+LtMiQmmp8HrhLN/RbnQcsGABPYi1peCF+EQOKwNwrcxgbF43LBkKfMnYIcvM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nLlhN5aV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46266C43394; Sun, 24 Mar 2024 22:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320219; bh=4PlkdmqB6yZ6noXjc3qFkk6SADhbWCGGBO9b/AhRtr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nLlhN5aVRBctvJ1lJCvmlHpIXGFSERkduBqOHT32YrrPbk+vt1bC2l75N/JUpbJZj Dk+NrxC3/Yis3fkx/79GtAjU6MApUH5UTbnh+r1mcWaMA2hPGXUfhjfiAMUTPRuQpg ZiJG3qpVxX+5s88xpaZFevUNjyaInTDAGK/NQwpdzlCbtiJqDWyXTnOtH7xUBvGtc6 CjBglfOymUCUpKvco0uWXm28gmCRRZ4UA5QL6rdL2OjLN77fVb26eSLjBts3vstnJP JXShkWLuljrHYoSqpl2tUoRU4Ov0XCCCdmdMBPzHAasZASsTDYsCmFhx4Etp3j6i4j PfQPfw3BrmOTw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 6.8 527/715] backlight: lm3639: Fully initialize backlight_properties during probe Date: Sun, 24 Mar 2024 18:31:46 -0400 Message-ID: <20240324223455.1342824-528-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 abb5a5d951fbea3feb5c4ba179b89bb96a1d3462 ] 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: 0f59858d5119 ("backlight: add new lm3639 backlight driver") Signed-off-by: Daniel Thompson Link: https://lore.kernel.org/r/20240220153532.76613-3-daniel.thompson@linaro.org Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/video/backlight/lm3639_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c index 5246c171497d6..564f62acd7211 100644 --- a/drivers/video/backlight/lm3639_bl.c +++ b/drivers/video/backlight/lm3639_bl.c @@ -338,6 +338,7 @@ static int lm3639_probe(struct i2c_client *client) } /* backlight */ + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.brightness = pdata->init_brt_led; props.max_brightness = pdata->max_brt_led; -- 2.43.0