Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2527279lqp; Mon, 25 Mar 2024 01:12:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwuwkA6q3iY5d5JzebKgxNwV5NgQANHcRD8+j3I/JCAJt9lpfBIvIz1UDxuqJvcbZ0spp2w21hWFkk3M5IJLg4mKszne+OTz8fp4JVmw== X-Google-Smtp-Source: AGHT+IHDYl6bkNEDBO6WsgloT80EApdYqsiu2Ib0Xmn3phjqZz5+0pmBn/PTVlwaZ3NjUwMOuD/H X-Received: by 2002:a17:906:a148:b0:a46:f279:8f69 with SMTP id bu8-20020a170906a14800b00a46f2798f69mr4353598ejb.54.1711354324429; Mon, 25 Mar 2024 01:12:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711354324; cv=pass; d=google.com; s=arc-20160816; b=ee6oq8JEYQ9it9PxqiZA0EkGLzhzNsPaEXzkcVXh5Fv4NgggYGOUtdfoE7dKKqZ9I5 PzjOTLPmoZElomIuuV2cggGcIsmYwNFlvpSfzc+gXlrJokVfMsZg2u4oh6QfzIAXa6+i bwHn8pGXlnsV5Vx13Xmyk5kuNOMuGGlMFWkn98QHslCRJhTV4D2V6ZAuiF4EsYmfQAZG 8IwB7p7QOMq7Rr9Jq3aOIOFbd4h5hK9s44r05YolrDts1iCzPQlbFuj8ipnIUg+l8arz 2JeARoGVaRNT7horbrHZU4eu0eex+GXW2ywQQu3Eg65t19O+j218tQaoxnx2LJ7zBjUW rZvg== 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=04Lt4YZ9IFwmoxgHGRWI0fx7SbgpA8nwU+Guyc9VBAhIR5ZRCR23J4emCy/xzHeGSd AGxk8UA5yI5abZYIXbWthvccJotDk6Oyssj7R0N9UZrxLGTUcGoVLG9/gxfkBMq2INi5 QU2eFlbZTYGElRl+s4gciHyHHzSV1jC+Hhb8cT99sy5jYrcx/j+WuWPDha4l7yyF+3Qn eX9Y0ccTcaWGk+5/aF04jKkv9usS86Fs54xGq5MXFthU94x/baGtZglh4puR2zdvnfnF TpXtZRG7mD1EdcGuMzYAybmP3meLuV5QZbQjxuF0iGptdjRRGEMbARushiLV9+7TNufy trvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X8cSYEND; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115972-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 g13-20020a17090669cd00b00a464fcaa08asi2234410ejs.975.2024.03.25.01.12.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:12:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115972-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=X8cSYEND; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115972-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 0283E1F29065 for ; Mon, 25 Mar 2024 08:12:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BA443949D5; Mon, 25 Mar 2024 03:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X8cSYEND" 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 D6D0814D43D; 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=CGWX1zIdojWgq8a2JdKjje7C+xbGH4WSJZm4F8Af/U7hIfNwswaI1sSj1oKlOSu5jeOCKtrIZODpJIMhHEyHUfvTNk/yHKufmKy4G0lKDI1z4V3IOZU/QbxEW/96/m3TpW4MQk/lkZIa5zsz3znlaSiYYIYVf08RQScr47FVvyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322259; c=relaxed/simple; bh=LYhPIjMpKEPwiaOA5bQCN6S1WNeGsEIjM6B9l315d1c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pl3DANxNSsJlhynzNnTzWkcqms/hGUkgErqt5A12mEcjU0wySZTDqv1NUrBvaHaWb/Xl+M3VfQ/oqGzKmDgrRCJPoBKWO6uYiXfxRk3QCyoa3ijqiddx6K0n3x9lPaX44/TvVv9bzCKjZYm4xCJIw7XUI7b/HuOWWPul4gMwjvw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X8cSYEND; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FE83C433F1; Sun, 24 Mar 2024 23:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322259; bh=LYhPIjMpKEPwiaOA5bQCN6S1WNeGsEIjM6B9l315d1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X8cSYEND805U5KXFutCFxoVK3fJnWzQ/eiijMN9GkY2fn58SqHmf1/PmhucMtRBf7 2L6bCrktq9KqrlY6PD3tVI886824ZiO20In26osZDSfq0XFMJEsjgAXPHAEdvhyY9I 6K9YtfLUV+p+w6PdIbB39sOht/PWzM5uQsNW1g/2ed196Z9NFOJOTAiZq6TfDj+947 EwiPdoeZ4YxyGTO26OLA8NoqUS8KOjuW/p0enRQkJ38p+hxURzOBwXjrPL5i1xXlsv CAItREDR4jVG8K1+FmNYFKRUop8WHkHoVEKWJpiayJABsFLCudTjLwrxj42Op+4Asr ReG2/x7Au0jLA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Thompson , Lee Jones , Sasha Levin Subject: [PATCH 6.1 342/451] backlight: lp8788: Fully initialize backlight_properties during probe Date: Sun, 24 Mar 2024 19:10:18 -0400 Message-ID: <20240324231207.1351418-343-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 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