Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1807159rdb; Tue, 20 Feb 2024 07:36:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWiPMUhhG6EC06kDpAlRthEEmHb1b/1Lb+7WLwg0mlA1ALXIlAf2bNkgwgGSUXsSyEuVFOB9Evj1tdAZeYRAddudEs+D5Ot1BI8TenixQ== X-Google-Smtp-Source: AGHT+IHbVprtqEzIHqKiuS/HB/0trG2ss+i8dsarwFaiXj9Yfu/rEqjoAW7Oae1AKwLzL+kO/sCs X-Received: by 2002:a05:6359:411f:b0:178:de46:783c with SMTP id kh31-20020a056359411f00b00178de46783cmr19099045rwc.16.1708443364746; Tue, 20 Feb 2024 07:36:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708443364; cv=pass; d=google.com; s=arc-20160816; b=ezNxm50SktGedCJDLSnKMFMzGuIgPMXeUIthOF8tvGX+wzwLRQ7nzvgFhpCWL6os31 OVAWPChtTpv/xB0rGXBR/L5VM14H7BEJ5/d5yhI9Yu5jDN/ELFSmlTMzLKH/350qmDTC tZpfZhuw1AZZo36zhwEvfzqHxsRYN2vo7VekiB6t0X3RkTtYn0CmGYaBInWRHfgczmiC 9Gu02L+ep9ZYd/Vn4QfosFlxqvTfEYZ0pswKe47FllKZ2igaPs6UsjT2yyQAOVu3OuU/ Ew3qQu9TFoSTW1sPCt44MXB5sa2og5xYNoZwbEW0BeusCCt11Xu6OaXBEhrt0q+qnRsR 1k9w== 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=Jrtujh/LnXfvYMR2N2cwo9zSO80+VM2HiXhsn02tIjQ=; fh=rVH8VinaRf7aO2Jy4zhtzHuf1AG+zYe011uBpJGTqsU=; b=epUvfxHhjMWzVtEzHja2kkPuM40tCJh2PbTgolWnbFkBtRVRPyTBzbZPwYAQvnX3w7 aHs7TmKHuLc1rexi3//DyQQ1ijRUXrxReqPR4YYYyU45FB/BzTn9hs1TE8unfRVQCl4U f0FjyXgFPVPPIAOYRsCulbcbf63VimVKkM/5omlGcJUoC8yvUr7FO0f4fAhVH4QAv+5I Rai9mjSRVyaWa/0xxUOmgpmLTN+YPBO92aWw7cyDae1qjtiK+4iNMm/T6NusA2x6fAfj zvrY6NG8dBBDbHq9q3dzsvnVjS1vvjp6uf46DW4HIjkYfBemB0Dg12yjbYd1Txva2bSK tn4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kUY0i7lc; 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-73249-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73249-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 e26-20020a63745a000000b005d8c1b5a3bdsi6356993pgn.216.2024.02.20.07.36.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:36:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73249-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=kUY0i7lc; 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-73249-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73249-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 6DEC12847DB for ; Tue, 20 Feb 2024 15:36:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A66B762E5; 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="kUY0i7lc" 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 A112076037 for ; Tue, 20 Feb 2024 15:35:44 +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=1708443346; cv=none; b=QrTeRCm7et3izKSiLfUqqvj1KH0BZ/g0UpPT3bthB80YEKfnYBdaH5EBUi+kH/KOpo9i5Hny34WQpeYWckqsCx40k2aapucEf1kQoBrHjHDkQxIn/pa3y/ldtnFXfYi8a6Ftgcfa7x1ACwKDjhYeA2Vq8hNw3ShxjpX7hn4korc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443346; c=relaxed/simple; bh=LdGB2B5rFcC5/PxIMzBPHrC3fcULAF8gRB14YAlPNqg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZOoK4nMm0RXIM9PS0oSoz9LWld3gHr619pvN4JZOrv/M9xDH6B6ZW3kf/ew2patgnebvhvjhJYLd0xK2x1XNS9DOkOL1njSnVwU1I0g8DZ+8SuQDskW8PNwLKwpd0HuFGShMerljxaQq2T0NIui1QTNcQ3NMQfMaylFaVybuMEg= 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=kUY0i7lc; 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-412698cdd77so11141295e9.1 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=Jrtujh/LnXfvYMR2N2cwo9zSO80+VM2HiXhsn02tIjQ=; b=kUY0i7lcs8xyQhIGX2nEAHG+cGiDpXoOnGMtCs6PDATpuOYWewp8T9uGie7EUa2Jd6 BiayhkagUFk0ANspLxlfiW23DJdlif8RH/FpS2jZ7XMlZKQAETitfYvEDUlabOPRYvfs v3uEhHIzyx/WUiltYlYugYmUJmOI5kkRoaNSOipLUJzrsj0Oq+c1jWmq9xyfdnQCMR69 6J+ofmKZyYOL5XZJs0WwU5LoZVmu/LNpmx5vI67agWGfdrA5J9BJd7Guf+pMe+eCM+I8 yS5qGuUxZsc26jPCBotqYJ2vGQJjdZ7AN65qPzSf5NlDydRLii4/eg+iKdyvW+NKLTnd uCEA== 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=Jrtujh/LnXfvYMR2N2cwo9zSO80+VM2HiXhsn02tIjQ=; b=OSrkw5F7bc6Nrc4oXzJzwUMW2gMVE5CRf2Sv6z2CV95jMxZdbRjiRwXnA7zIcLXJt8 AcoTTaljAWyvJpM9mB3Se9kuUH/rUT2M94Y8rsh4AMINHu6/Rzr+N9InC94r4WEeCKDx AGqffR/UdL5izf0v0RBNFA4B6cO/tBweLDlUZq3kt+wplOj6qnfgplrV/PJPxFinxQzm g0l4T6tMiXcyUo5JWlFRaLQkYHB+UlkEg2L0sRm97RSXICMS5oR40djAxpqrl/9wg33n on97mRJGpRgKT4ZygS31vnOndUe1VOp8J6QyzCYK6iOmQU0pYlOPUAtj/GMmkfJgiLfK j/2w== X-Forwarded-Encrypted: i=1; AJvYcCXpupxYnFU17SGxjxhfMqsJEG5jHFm2tzDMTVT5FmA6pYiaSshORbERX74r4pnSDj2rH4IXkNWIziKJWmeF4om0MRC+CA1CohSFt0nj X-Gm-Message-State: AOJu0Yx1P+4hLdAf0aItRECNqUlzpceQwPsdCGuR00afZB/dMX+aFle9 UJEQxHkft6cW1l2ZOp9rgv4v9pr8KzsxDa+psfuGlEu21FRGEQKH7bf+sm+1eE4= X-Received: by 2002:a05:600c:3ac8:b0:412:6ebe:9ecd with SMTP id d8-20020a05600c3ac800b004126ebe9ecdmr2032288wms.3.1708443343086; 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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:35:41 -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 1/4] backlight: da9052: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:35:24 +0000 Message-ID: <20240220153532.76613-2-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: 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_device *pdev) wleds->led_reg = platform_get_device_id(pdev)->driver_data; wleds->state = DA9052_WLEDS_OFF; + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.max_brightness = DA9052_MAX_BRIGHTNESS; -- 2.43.0