From nobody Sun Feb 8 01:31:23 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 15D6776036 for ; Tue, 20 Feb 2024 15:30:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443020; cv=none; b=W33N3c3e6ulsPRE056BGSEnRV4GK1zNDSryqjPmbA/135x2fDttZVfLMmVrME3felIH9QcGgsZcvjDtbXLwEwDyyUzJYOjTDOLtc4IHK8zf1TfjiquTOvuNy3vXdXjqyJTKGNkN9mtG7VigDG+VQnN/akm9ebaM5j2+upFX9lNg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443020; c=relaxed/simple; bh=LdGB2B5rFcC5/PxIMzBPHrC3fcULAF8gRB14YAlPNqg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ekvQ3BAvCBIav130Vpy7/Hltikgb+o9/n0vjnVU3Xo0GcTNtR3RzmFzPG35i8ZtSBXEXBhVkK0AEhgd2EBn7sIo4DSgxlCIY8YP3k9MqvFKvvppYbdqOOIGyVCByTTzrAguhWy6Z1mYDlJZkl8AXWzjbgDsi02fLi71H+wGWLc4= 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=Tpvqg7iM; arc=none smtp.client-ip=209.85.128.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Tpvqg7iM" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-40fb3b5893eso31715495e9.0 for ; Tue, 20 Feb 2024 07:30:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443017; x=1709047817; 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=Jrtujh/LnXfvYMR2N2cwo9zSO80+VM2HiXhsn02tIjQ=; b=Tpvqg7iMV5q63sBjULxsRtuJNDWaVbWVaL5CRBP3rK5EfzIeacUE0X4u6Ylpfj65cQ ah11inTbgBoCa5Lk4RhKEBiwtAcdJncti+HNMZYvwav9tTdLzcCrWGMcUpg03PyfVbVQ kJGXvvd5o5PBNV6s7JPKbTjcxGzDtdcOaibFmsy8/df7+PW08kZ2I47Q/zrFcaYAb1rS jNQIxlIK6OR6RB2/EKcFBNPGn/zyuYYkudEELljX/YoATJiiukcimDPd5mW/GplMxD5L RIxvO5Z0g0AyI9Z+RIgdkN+HOCN1zxsBz0wowQfunZUU/42Rje9uRsV6zNy8EzjdMgZ+ P3LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443017; x=1709047817; 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=Jrtujh/LnXfvYMR2N2cwo9zSO80+VM2HiXhsn02tIjQ=; b=lXgjDFEf3NyRXVjTn4L1Gr0AoCBF8sNvyxoCk2G3GEWJji7vdQSZGf5k2R+kXm5N1e vXUUH4LstvRoBFraXD6IyZ5fMTcz9hSWLrNLgcKvXU0AiOGWMXR89B2/VhyZWb4vj9Us syX8p/8C3KpziDgh+2nn4j6d6ZsTJF3Dhzz+kL5D+DYfTbtit6qrfntDoFpEUGc81w6k bK5NvwoV3vlJLZAFRi45oYhgYuOjQR9x+UXWur3celzM6Ms3DIMQw5eeUtJku/wZD1uO p34AMMvmIJMQ6gjUng3U8Je5SFHNdxo0C1tS/yrZjrSXmeyl5QzgV+D7KW/fj5ZxHnM0 Mdpw== X-Forwarded-Encrypted: i=1; AJvYcCWpNdciiR3hcKkX5ejH6pImeiXvuXD6WwHslekYqZjjcVDpcmVkZHK6ni/vxVYZ9lDvRh1UH/kQARMT5djp/fmBtdHN/AUIDRPRiDI7 X-Gm-Message-State: AOJu0Yw5TYxrGnVeiEgZ20eBTxp2jdy8cL4Jyxvvt+gz7nGdnNT89AXs Q51VJ+VRS3ASFMUOhATVh5k8gZep84Aj/ts1QMmC1FlIjyppvu6+iHndmEsKig0= X-Google-Smtp-Source: AGHT+IFm14DobYCPmbNLGol/rwT+mRhKjIrwciaLuFCcheE5WveQ1xwJForozYxveJbElFbLbjVPiA== X-Received: by 2002:a05:600c:45c7:b0:412:63fc:1c4b with SMTP id s7-20020a05600c45c700b0041263fc1c4bmr4848698wmo.10.1708443017431; Tue, 20 Feb 2024 07:30:17 -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 m4-20020a05600c280400b0040fe308ff25sm14691564wmb.24.2024.02.20.07.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:30:16 -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 1/4] backlight: da9052: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:30:05 +0000 Message-ID: <20240220153010.76238-2-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153010.76238-1-daniel.thompson@linaro.org> References: <20240220153010.76238-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: quoted-printable Content-Type: text/plain; charset="utf-8" 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: 6ede3d832aaa ("backlight: add driver for DA9052/53 PMIC v1") Signed-off-by: Daniel Thompson --- drivers/video/backlight/da9052_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/= da9052_bl.c index 1cdc8543310b4..b8ff7046510eb 100644 --- a/drivers/video/backlight/da9052_bl.c +++ b/drivers/video/backlight/da9052_bl.c @@ -117,6 +117,7 @@ static int da9052_backlight_probe(struct platform_devic= e *pdev) wleds->led_reg =3D platform_get_device_id(pdev)->driver_data; wleds->state =3D DA9052_WLEDS_OFF; =20 + memset(&props, 0, sizeof(struct backlight_properties)); props.type =3D BACKLIGHT_RAW; props.max_brightness =3D DA9052_MAX_BRIGHTNESS; =20 --=20 2.43.0 From nobody Sun Feb 8 01:31:23 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 B2CFB76050 for ; Tue, 20 Feb 2024 15:30:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443022; cv=none; b=gCoRCgIHaU9RlOZ9CJ+F4AoFjS07R0bQsNUZQtmftEoi6geATnyQUlNsstJIiI4drSHWtAgk8MnBvreybjDC94rNi29M80q8uH2vDTrpAVcR9vdIaU+U6lyBkP4KtIPysuuGpu60oc0HT54EY9GHQ9tFhjOQQWOJDKwDLVRT+Ng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443022; c=relaxed/simple; bh=O1s6f0aVlfXsIZe84Tbyl+6qx99iwWHj2GqrxpYofNE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NK8A1G0m58JUqeoK4sOsgGwDVocVgYGJgPZasD8xraz8TEPR0Mb8dZgSXaEQWZVj0jAkkwjE791rLUY7klLtU18hwLHoVMFs3TlvwPFzVOyoryw/PwYjKOmt2/qvRpnYx7kBqqic/Rr7R/O+saz5VeWvENbmLGxbokfaTgb3zC4= 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=s58moo8e; arc=none smtp.client-ip=209.85.128.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="s58moo8e" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-41272d31489so629305e9.1 for ; Tue, 20 Feb 2024 07:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443019; x=1709047819; 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=s58moo8e4vRXAc/2zrcfftYY3bK2AtDu/F8iOkPPou/KqAAOEX6NftKqsK2WXUTNTU n7LT7+BvO4SUbiXW7iV3fIn04qY8jS6aHYlYbdfIWkkYnJtpLo7DArbeFEnPLFdzKfmA L3XKfvq/AbfRmUV9PWC9OpQRfO2djA0JjmQWY1cKDT4zFos+MvPnUdw452ic3jDbEd6D vTQ3t3KZv/94d2b4C/pYkQs3Y5F9Juxiuv588rQ1gOfpwh5qPC9WXuagNC1xOf0qV7Fy GczybFyeZAqVkk+MD1krH5eqXECOuEQAqd/cp7p1uN6uN7Ill10D3GOzbz9GY2vytQuv Tinw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443019; x=1709047819; 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=dAIloFehk/3DZAqqkJdv41VWwbTNLwlpSSbvGC+g+BcBQgNVnZXlmuYbsSW/p7WjU9 d+vSfhIzGhApYo9CPR24xshs4NgTAPVIZpoJbw7c0Ndv6HLDMslvbw+44kQD1divB2Tr qdds7HHQFf5Lc66Ek8OBFFhlCJlJpLqOyJstpeGtEWPP9i41YoA6VWNBY70OGdWN0yQG c1RuVsdxivz+JbI25FHMLA1YTFMWQ9jSAFc39BceRg0w/PDTlBcYHNsy1O86Cms348ba mmxv1HM6/2pSy2NzxyAomttedB46ra8D5FaBRDm7D4Tqg9t0PLwFrr3wRSG7ECHDL26e V4LQ== X-Forwarded-Encrypted: i=1; AJvYcCWA6QtK9yqLtPkjc4KH88+8otw6W4rm7+zcEMEU4FVtqqusrhKIduzi3+Unq5DWYbyMT40cHaHe53yX/NG1f4e2OwDuK159axPrkVJg X-Gm-Message-State: AOJu0Ywp9baq1XMoge2hSX45N4C5wE6grQnervrUmOPZMj8/SiiYpvvX gczpakSDpTSAwJaBg7FDSQ/dtnIxe09p9Cm1yyfXagFeUHz/EmorsMZOOuPhi9U= X-Google-Smtp-Source: AGHT+IGVWP1PsTIPuhfoCEDD9mFLoVD1M1jFW0GdMz0Ht5jy2dnUwgwZCQxJtaVq+F+uxqiSbUMY5A== X-Received: by 2002:a05:600c:1d04:b0:412:62ec:672e with SMTP id l4-20020a05600c1d0400b0041262ec672emr4734507wms.30.1708443019097; Tue, 20 Feb 2024 07:30:19 -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 m4-20020a05600c280400b0040fe308ff25sm14691564wmb.24.2024.02.20.07.30.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:30:17 -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 2/4] backlight: lm3639: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:30:06 +0000 Message-ID: <20240220153010.76238-3-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153010.76238-1-daniel.thompson@linaro.org> References: <20240220153010.76238-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: quoted-printable Content-Type: text/plain; charset="utf-8" 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) } =20 /* backlight */ + memset(&props, 0, sizeof(struct backlight_properties)); props.type =3D BACKLIGHT_RAW; props.brightness =3D pdata->init_brt_led; props.max_brightness =3D pdata->max_brt_led; --=20 2.43.0 From nobody Sun Feb 8 01:31:23 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 6114B762E5 for ; Tue, 20 Feb 2024 15:30:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443024; cv=none; b=kfNAqrGVHKsW1dCDmkR7Z6lcI2K+Nh2ChZ884k2cRqiK5CiL89D/ivLBzOrayMhF/9/6QPyydVfAIc+EGWvMWzEAxj5VLo7iPNMeVKaDmXn5ZjWBiBRpO80toGrQXPN0GqEBmXBV5/gGO30W0g1I2qC4swQTSb25SY5pHE2pdtk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443024; c=relaxed/simple; bh=Bdr6esLRbtemkpFIIDa1y5ugHKxf8AG0iRZ2eQuhhuA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H/HYxGKUhSpoGx4ZHvibWTc2Pv/t1WL7/jDkf6pYU7n14dLKw8QQCDtFX2pzZtUqjZp/lvETL4n58e9fcvkRUxMKBPOjVzJsm9bqz3MHS0Xvivj1kX+ptnsirsElAwUIBYu1c4T4HiTVFR5hrlYYAf/tdAGrkqh8RJJg/wHJVKI= 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=BDpaT6P7; arc=none smtp.client-ip=209.85.128.44 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BDpaT6P7" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-41270d3ce26so3569785e9.2 for ; Tue, 20 Feb 2024 07:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443021; x=1709047821; 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=CcW5EHUKgbIlTJ9AkvlcTH/1qNEKLD/WUfYuV6zpMeg=; b=BDpaT6P7UUbukpukR68XrAiSptr9PbQ3cDoVsbaLt+4JDqLwWvhDee/XGvf+A+d3tB KozFzOqrLfrvAQej5BtBLtp/GV4kqZHlzE6iumVRqnRTJjYyAUSW2h/8sYIoSF2Uanhn c6yzyMPMPZuAx4gqnrQ/dS8drqsDCpER9gkwfLNBB3phvWIrnAj1HqA/y7Gs8NfMb1JS g7mW6rguM6BeSwhMXeHYdTtsvFMfHvBzIdy9j+/tUHqQ8H7kfXNeu7b9kdNwVtlg2zPm F+RQidGPPsav8KDm64q+1NYt6RYgrTJAKbm/RtEtjIqHMpj9gCZEohafg7Pq3lrL1Z8F 14yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443021; x=1709047821; 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=CcW5EHUKgbIlTJ9AkvlcTH/1qNEKLD/WUfYuV6zpMeg=; b=eUQBCOSMxYHezWZI7m2YFUyTIIMavtZNCNc7ByE8uLkgCx1rzp0a+vIlkRIFeP/Zym mis/8mhKzyP3hWuB4/5adJBzQuNI/6aVT/JSLbmxVoGxem06R767+eqzG6Zz0XrM8GrF dkcAVu0Dwat4jqiMoMmWveEMfCTlKFe+iJQUgaXxDtyCBgAxpVesFFUmn8qXZERLrtxO q9pEgHtfzOCizohNzul+6fPYgjVkBVHX/9PzGeSV6SlRAkexozWOuxOBRNMBhRQvc3T5 7udF7RmJVUbk0mgtvDMJqcEYXKoO9OKf618vlfwMp7MynwGi8vHdyHnZ/UpCbJK7Y5Wr TR4g== X-Forwarded-Encrypted: i=1; AJvYcCVCEaDM77bidDKuUxDiL2isYL3kdNUYBCXSe4S4kBqYi2zX3Opm7kC8u0QvIub/e88gets1afTlsTuSB0+w/GqIzSrP0wH3+hbWr1P1 X-Gm-Message-State: AOJu0YznzB65ibN0SUmI9JA6q/0YCQiUWUMJE8DWdn04rLHbj5Y79EIm Pan2PCbA3Ui8KqiCAw74Ij4ascq8oqrT7EJ0XLgUZ0SV7QaYWO46y2eeFRSuJ+I= X-Google-Smtp-Source: AGHT+IFRnEcCOrYMH/Z6LuCcovUr2mE5uwVOXe9d/ihECMTEDLLMcUoqMuZPky/aASEJWkUNQz7xAQ== X-Received: by 2002:a05:600c:1e01:b0:412:5f1f:fd0e with SMTP id ay1-20020a05600c1e0100b004125f1ffd0emr6114959wmb.0.1708443020878; Tue, 20 Feb 2024 07:30:20 -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 m4-20020a05600c280400b0040fe308ff25sm14691564wmb.24.2024.02.20.07.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:30:19 -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 3/4] backlight: lp8788: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:30:07 +0000 Message-ID: <20240220153010.76238-4-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153010.76238-1-daniel.thompson@linaro.org> References: <20240220153010.76238-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: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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; =20 + memset(&props, 0, sizeof(struct backlight_properties)); props.type =3D BACKLIGHT_PLATFORM; props.max_brightness =3D MAX_BRIGHTNESS; =20 --=20 2.43.0 From nobody Sun Feb 8 01:31:23 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 DCEA3763EE for ; Tue, 20 Feb 2024 15:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443025; cv=none; b=bdxBh50mT0F+FI+Ivxx9mStMPiv/iL/YCFUdFZL+jnn86rEFWdjKVlMfIun4Pkg+CZSwQO8LX6pAZAeRUutAfIU7p7BEuWf3JKtWXLAH04LmJEypHKbE8+6gNWoWRqwcF+PSmk0pcQXP5iAopLG8873yr1GjADi28RGsKM9ojtg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443025; c=relaxed/simple; bh=qYHC0DIL9EkTejQxo0dNu3EOioYY1QzCa+VXZLu5HiY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OYRFfO69y4PQs1MYXO2aokC904LHboW1AuXJXQlbWd3Wiw/kQnJfdS427riesJJ+6GnYbkVeVPN3LJJWhDoCjTcDAfJIM850kOZRLGXbo2aMTlakjVE+l1dbDt/zYJRaH7nAFJTRssnxS9Xcb6OajtxKL1Wqy0u7OVjm5AILTrI= 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=c7FNHgwr; arc=none smtp.client-ip=209.85.128.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="c7FNHgwr" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4126fda8ef8so4616015e9.2 for ; Tue, 20 Feb 2024 07:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443022; x=1709047822; 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=YwLWP4/vhF0uIJPtwS5+bkpQQd9v2zac6pd8EH25YT0=; b=c7FNHgwrqAoCvO0G0cQ7kwC8S+uOlPtFbjY113GjE7pbjgX7wAoF4kzSvpbDSB7F89 x97ZRe3cKmlGLaXTTMbz8Gk9iLHlMTfmOGj9uWHl7fWfv/+hg1d/ZmQlx7AKMX7cmpLs AdP66eAp0Y9V7nvFzc/zlubtrSbLz0r2ai6bh/5uEMHgOK1TrH41w9RFtqd6RFBtDjNN KCSmcg5yHp8ayC6BB3v23UCWYog4H1D4vjRB13vh2v8Z0AUZD95vGzXDmm4k42Wq+Z3/ dYaqJ8YQqDIE/9DRdmyCcKl3Wt+4CP9cIUAaek+jzv2k8xx2XFZcs65iV9Sx/1HnFN8a CwvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443022; x=1709047822; 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=YwLWP4/vhF0uIJPtwS5+bkpQQd9v2zac6pd8EH25YT0=; b=ReP9/riWQRGq0LfXU5w41ile02wR6oovKr+3FLpEurIwNQPKwKYmlYldaS61l+0glC jPkC5+shsgfZzc6v86ZFLkRLqVZkVKTIeU1flNgp4+qtfu+gOPrVg7XiquTadY5MFLGm zl/G3AHtmIXCQu6wQ1Z/D6g429UVT6S09DICbYU0vlydM0VrWi08uS5slX3oMvstkPG+ GJNxSh7xOLfHtcc3GE9OXXc2ar5tEX0Jq/2ZzbkH6v97+Fw7rY4pH8RuvUgZHV63xwc7 nyolaedsKpIaM7BtMtznfCCpzPslaUbFNNhv8j/hQK8WmWTEOm5GfJi7J6sFM4Nye7zL +VKg== X-Forwarded-Encrypted: i=1; AJvYcCWvQUpKSi5B79hhqpDJgrPKnAL6q5Jm3lIUJX6VXEahiGcPoVe6OFob5innBfgTjNPwRJQpNWJpxNj3s00zM+elmfnJZ5oS7YxHyZfn X-Gm-Message-State: AOJu0YyPtrsyZiHxKof027kqmsstqEWC5SMWQHxQpgs5cNAD2xiPVfiw 3rEVEYjtOutJaFhy3lZDYJPn0w/BfQinq4esegzaOC4zOd/Y6siG9ClpSE7EibE= X-Google-Smtp-Source: AGHT+IEGWcSQbhDlP9tq4t7O/sVQt2zHCnqWm9u68HuVcuEt7FNSTdwzCSXTgIgXE/i7RnLhBW0X2w== X-Received: by 2002:a05:600c:2805:b0:411:a5f9:26f5 with SMTP id m5-20020a05600c280500b00411a5f926f5mr13067635wmb.38.1708443022356; Tue, 20 Feb 2024 07:30:22 -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 m4-20020a05600c280400b0040fe308ff25sm14691564wmb.24.2024.02.20.07.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:30:21 -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 4/4] backlight: mp3309c: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:30:08 +0000 Message-ID: <20240220153010.76238-5-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153010.76238-1-daniel.thompson@linaro.org> References: <20240220153010.76238-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: quoted-printable Content-Type: text/plain; charset="utf-8" props is stack allocated and, although this driver initializes all the fields that are not "owned" by the framework, we'd still like to ensure it is zeroed to avoid problems from this driver if the fields change. Signed-off-by: Daniel Thompson --- drivers/video/backlight/mp3309c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp= 3309c.c index 34d71259fac1d..cdf302d6f1cb5 100644 --- a/drivers/video/backlight/mp3309c.c +++ b/drivers/video/backlight/mp3309c.c @@ -373,6 +373,7 @@ static int mp3309c_probe(struct i2c_client *client) chip->pdata =3D pdata; =20 /* Backlight properties */ + memset(&props, 0, sizeof(struct backlight_properties)); props.brightness =3D pdata->default_brightness; props.max_brightness =3D pdata->max_brightness; props.scale =3D BACKLIGHT_SCALE_LINEAR; --=20 2.43.0