Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1807258rdb; Tue, 20 Feb 2024 07:36:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXtrEKGQiRHJ1c4R68Q6nlAMLxM6I8r6FKXybb+JSdbCTcuGopKruKAbG6XwblPVLff2Zz++qvk+x9z5NpQRy60WPwhhhjKv3Z+CTbJTQ== X-Google-Smtp-Source: AGHT+IEwkeyjqGeIm/D3e6IvSLfKEj25pjOX8vogj947g0l6H16Mq3W48rwp/rALr3yJSLSap0n3 X-Received: by 2002:a05:6359:4c0b:b0:176:d5b7:344a with SMTP id kj11-20020a0563594c0b00b00176d5b7344amr16382347rwc.29.1708443376681; Tue, 20 Feb 2024 07:36:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708443376; cv=pass; d=google.com; s=arc-20160816; b=w1pYbY7Y67Fp+14ut/UZDKbI8TNQlKtI4AIjNdXZC5QLMi0fSiePJe4Ms7WuJLr+Gh oE+o8tfB91GAV5uJs2Ll9zmnZsX69/hh6hgewrTX13+v05Uzr+imnhjJpUQpnIRMZ714 q8Jivf9H9zsfrlMRcSuHEDGgE65a6lK19ktXS9f4lRscUAFILCdHSTx88PC0qgs7ZLgW trHkG+h8Is2GRzCDfvISsl5iLyglcsV6vjg++4PaL7AC9HlqFgSdgryXLHeUk0sFFi4j 2HwTXJ0dxAfFi73lSUvjpD8A9RrGEk02FZd2hQJpZU8cbDBYw4ryc/8lny8fuFn/Hrxj u/Xg== 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=Dg9eYBATJE28KVVYL5JHYrMeYFjWDGTymWB+eHLR51Y=; fh=XgHqWyUadrNz72frraZbp+2DMztBDFEm+qd524d64oM=; b=hC1iX2Nv8Jl8py+vwXAhG2iF63bQJl6R7Gdij3HYX8hKfl29gqhWOY0L47/ssAA89T KlSr1oPJeu1RbWZ10ACnzxOI+cwPGNrMkT8yF7JXL79UB48qeksbDNKPkSoCAmb+vDu+ wMkVuSpkXmz+wtbdheHKRR1g4k5BNRpgKyW8XH58nNgcL6gsHg+Ratu4fhznD+wB+EkV yqBZLbIhkz1il0q6jKOb+sFDD/O3EOsrs3KFxMYlOB0KlWPFc4bh92YhVT70veSKaSft 4ekRP4AkuTrzpRM1Ss8Y0XO/xnIR2gGuZ3bk5LqWfoCi/4FpGdo/pYNMDsKdE1M7Ktv7 LGeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A49fnGSF; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-73250-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73250-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z187-20020a6333c4000000b005dc49a8c93fsi6333443pgz.764.2024.02.20.07.36.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:36:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73250-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=@linaro.org header.s=google header.b=A49fnGSF; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-73250-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73250-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 5B57F284757 for ; Tue, 20 Feb 2024 15:36:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC9A7763EB; Tue, 20 Feb 2024 15:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="A49fnGSF" Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F4EE76048 for ; Tue, 20 Feb 2024 15:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443347; cv=none; b=PRAYDGK3xrqdw4GwqbmtirFTBEl+lnUzDxuU1fEmUan5shJoeI8GFfBUTrc+72fxzllW4jPtkc/Wx15I/raKoS8mCBmxWYaUKjfwhOTZy6ASAm4QspG7aGuWZoE1ePMIw6A1zev3MA7PgjktS6u7o8zX5SFxIOngFKpxa01Z4F4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443347; c=relaxed/simple; bh=O1s6f0aVlfXsIZe84Tbyl+6qx99iwWHj2GqrxpYofNE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nqGrnZjHS6Z0OsyqSDYyExn5fZOjz3BnxbMWXaeBSaTg4sElLxTSY06uFR7FMUwtSf98dCWbxzyVZYRwY2lTVo287FWB8lhFnzDzDNZiBtj7/5jSgjHVwsJBn+2RjNGT0SFEWqwdowuubHxzI5mrpK9Oon9LA8eSK+Tiaxe2YQE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=A49fnGSF; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4127109686fso3122765e9.2 for ; Tue, 20 Feb 2024 07:35:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443343; x=1709048143; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dg9eYBATJE28KVVYL5JHYrMeYFjWDGTymWB+eHLR51Y=; b=A49fnGSFiIMUaweEaPKUd6QHs1z8WahFQvp8dNyIcW9wpWfWFd2pKWwpCxYEyVejeN ejOSqBBZKU8ynUhhYl076di+o4ntEEdz1UI7m689xVlDjaMPRWrPnKDGyE7D80yrZIn2 fi5fkQFN9QI/zI90ZulWgsKtp2T+W9OnKjK3lto9WHpRf8MXD2hTMxXDM3KBth7eYhrK uiViPRzm1rhe67dBpceWcm7iRkXbctJFzzXIe6LqJAzlwDX/DYzdPaPqyLDsSMI6JnMV /dFpgDoBkGGeXpKYCUWZvH+Eneu0XtgoU1RjOS4oKyE9RCgUgfybCcdjbit9k8pyIdp4 czUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443343; x=1709048143; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dg9eYBATJE28KVVYL5JHYrMeYFjWDGTymWB+eHLR51Y=; b=hUt26uvAfh7EpFFT0Y2k0+p0R9KOtfSVqWva6CiDl+tuX90o8UcTImLAHkQG9o4cEw OZiyzuDLw6hmr2Y7B2XIn8arn/UdkuiXg9DbbtprQNokID+OgEHxDhSmYMOYuWVVjZWd ZCl6AFifmC6wVWrpNYQOpxxT54BOhILu/wFqdqEfIO+mtDUGbyVqyCMoQUHdHRTVDSv3 p7WbVroZD6+qKxDNbbG8Yll+SnyUsXMIfMzhFvdYlkKrz4qRGMO/Y+OfF1JqFu9rRRxY 3jZaJnePmNQx1sbHCZk399PinW0BklE0htT4hTt+vxayiXlUt0RrcJcL+IQMUGlBtmY+ htHA== X-Forwarded-Encrypted: i=1; AJvYcCWgIgnMYo2DDZrXgxAm2xX/smMGYG55+Pf2dKRodRjLHUp7qXkVB9q0iS6Fx6G9yJHHH35wrlQJ81YoN3124tE0kXMPLzSDGF69VxBm X-Gm-Message-State: AOJu0Yxff7qGceC1NluLvYxtHdsoIODRxS8NG0w+3RnoR03kWU/l7DqA J7TFj/EGeLjNgQ89L+xtGezwytpeoTjQE+ABqh+3fuie1YDetFmUYh6XbPQdrEA= X-Received: by 2002:a05:600c:1d24:b0:412:6574:c9a6 with SMTP id l36-20020a05600c1d2400b004126574c9a6mr5189419wms.2.1708443343754; Tue, 20 Feb 2024 07:35:43 -0800 (PST) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b004126ec2f541sm2444905wmo.0.2024.02.20.07.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:35:43 -0800 (PST) From: Daniel Thompson To: Lee Jones , Jingoo Han Cc: Daniel Thompson , Luca Weiss , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 2/4] backlight: lm3639: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:35:25 +0000 Message-ID: <20240220153532.76613-3-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153532.76613-1-daniel.thompson@linaro.org> References: <20240220153532.76613-1-daniel.thompson@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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