Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2570387lqp; Mon, 25 Mar 2024 03:02:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3zZA9th4Y0351JcwnlVeIOnXhkNoWUzf0nSTe0/YzLgJRRabZcae68uXaUwGmg+/AxkWtt6kMlMp4aPzTkiH59p4wPHkBISxrdN/0XQ== X-Google-Smtp-Source: AGHT+IEqtC78iSmzGIvpI5EZCPiTcdJ8+nZO442LFblGuTWsT/F6pKKFa1+T3QxVJ1s5L5TSbR/c X-Received: by 2002:a50:d7d1:0:b0:567:56a4:3940 with SMTP id m17-20020a50d7d1000000b0056756a43940mr4690868edj.19.1711360949465; Mon, 25 Mar 2024 03:02:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711360949; cv=pass; d=google.com; s=arc-20160816; b=dPnznhqcTMBBZR7bVkp72nlBb8kXX9YRjrtwozO6+moaJzkmidryPl6yTrI96vfDPN sz8ohT69k74hpDqM7fWKy+moJE8D09tXQIjNYqogrJY7FEb4SOgJimz4yS4u2lgmVUaM zIoy2SAisJwTqWLX28FTIu9NWM46nwjzC5NxkLpwylQ2B9DrtSgOgt3dR1FtG/CS6i+C e084kuRcz6l8+Pu73SaoShkEGTVCJvCpMfIx9uXy2DnKf9hevAUr4/AUQIcXdZTU9RsK pedVuJ4c4RQR9MyFeowKtHhew8jw+5mEs0yDFzujBFMlkKluiRZ5BubKZypxZxcdfO/G r/pw== 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=WsMbzJ55Di9V/VkM5UIJYY0Jd/KPLGin2+k1VpNd1wc=; fh=Fj9LSz1CdZASwic04VleXKruhHZ8d4uJOKSpe2IgDfs=; b=deIY4PGuUwA6Abs6gsWs/op2ZSRyikJy7wQV/Q/a9yRpx7th63Vkyv8V0D65cA2/JI zGrSHYtuezBNugd589jlaiwe2UmqAaSam77uR9d2ThVVyTaXU1O9o26oFMm/Q77kTZc+ WBPVxCRE23usjSko3csoHugBWC7rG3EiLxdNPKg7nkLyeZ85ZyEDS6d1rLg+zC8Iu6cy 8Hjb7apR1c+Fm17S0yKdL2RMCf57//QtJ+0qa2vmKwBZGZP5f7fWmAgXDuLgFHRDfKiC wXFOGJUlen91OMHtWXJPL7TXtndxM7UrHwku12uWS7BQNmexf22V/6DwcQ4p8CAK27Xe SQGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GvLuKEgH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115971-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 dk14-20020a0564021d8e00b00568beae376asi2373194edb.586.2024.03.25.03.02.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:02:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115971-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=GvLuKEgH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115971-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 6F28F1F3376A for ; Mon, 25 Mar 2024 09:56:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92B443949CA; Mon, 25 Mar 2024 03:04:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GvLuKEgH" 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 54206232106; Sun, 24 Mar 2024 23:17: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=1711322259; cv=none; b=a4d6XJVi4qQ330krPRrgPwf6IIDPeBEpNiwGQQdvVUWL8fjFCSQ1CjG33iks04e+98OXp68x3W1k77OViyyce1n/KHQD+YqDAM+LO/7tCmer1ijIV5q59KdCmR1zApn+j9MY+up6FPfF5a/oUP/k8ZuwcuTtBqTf55zf+WfwEEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322259; c=relaxed/simple; bh=aLVdbHof967+A7os53sAyGT6DPP+RUzjhhVJB9ZfGww=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=blBGUYzs/ylsPgcAFVLpNfUePgTfdOv+SMDgxCC3peH5BthrOwiSkYELBkSLh89oUwhL4XqE5rLAPaiJXEXbmDG6AarsEZxIFbEyDhsOasCcK0sCWz4R2DbhIu8ChlBYM4SOUWyuhEhXMmcFFjmKF/flxLcWK2Zaupv5mz9jDO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GvLuKEgH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C858C433C7; Sun, 24 Mar 2024 23:17:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322258; bh=aLVdbHof967+A7os53sAyGT6DPP+RUzjhhVJB9ZfGww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GvLuKEgHAyesMwYJHGVwR5uEJt0aWOdTgqECDiIWCML263UgOfQ2eRbtwOEtOhE61 h0DjyvG45ofckGWQR2SU5sCCeI0XX4isJGs7KbStJpgVPF37tZM2WAR1Hc9PLQRVx4 Sf/E22anZNBZacGnPLD1/oTlpK9JOsSUcoZYPYEsNsQ2St9Qq3QHYPaWjL79MoPaNw h+/WkyGtRLr2VF/PDgU4rYbZpKTCKgKCWayJ77VVLHFXvYnSEFmf75wONG67NMorK9 696hC+b4dajamoOvq455AsyH1ccowRls/T+MiWmthlcGr6gqXryD8tV/SAtiPT1ALU jTtORkPkBCeQw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 6.1 341/451] backlight: lm3639: Fully initialize backlight_properties during probe Date: Sun, 24 Mar 2024 19:10:17 -0400 Message-ID: <20240324231207.1351418-342-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 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 6580911671a3e..4c9726a7fa720 100644 --- a/drivers/video/backlight/lm3639_bl.c +++ b/drivers/video/backlight/lm3639_bl.c @@ -339,6 +339,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