Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1807352rdb; Tue, 20 Feb 2024 07:36:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVkRstYp8fiNM/Vi4nUtV4Dt3JTKeLqFF6tdQ5lYS8g24ophGZTJCjQFzSGmHFrx0EkQCufdsIny9grft3ELXLVu2LKRPFeiBdTWDv7ow== X-Google-Smtp-Source: AGHT+IFu4xC0T8JZBo+6s4QFl7yLippFI7lNslBYpwbY/w6gp8ve/DVZSJEQCfsQLHdgiPcMe21k X-Received: by 2002:a05:6a21:1583:b0:19c:9219:f3eb with SMTP id nr3-20020a056a21158300b0019c9219f3ebmr18708131pzb.37.1708443385191; Tue, 20 Feb 2024 07:36:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708443385; cv=pass; d=google.com; s=arc-20160816; b=Xa/dHMCFho31zdzwl8kqWqyxiVBQyd3aKiPsdfutONVkuWMgJ+Fa9lgGD8qpnA8yUe 8lzjaDwzt0AGL2ZGtsWFSQ/XPoeKDJ3MIctpMJUSK5VLBMamOzxFsSFo+NUA92JVcf4/ 9SSKuot4E9alzRpq+6xwzMGMx6DbIU5edoHLgotISb8shHSoe9Vg7XAGxurdwLxunbvj JO6hlhR2TtMVWAqTkn3DmXeX9aZxCIII4tYrOlCUQRIelk1y9xlTBrN3NCupCpKc5WWK wB4OZnzBKfP5X/J1CE1gmbtki79b3eIdeb6HRIlBlzzosDr2Hkkc1If/vp8D3Qsr0sW8 UxmA== 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=CcW5EHUKgbIlTJ9AkvlcTH/1qNEKLD/WUfYuV6zpMeg=; fh=FbZGrg37zDoc7TFrQaX+L5t/DOQb9tyjX9hXAaQGsPA=; b=ig9nUIgR59ZCjC2FuX+OJQHA+pStMeqW8gRjOSNNdMAtEtMR4NmdJDHCqeln/+M4Tr C2K/UqPxOMnNkTE8wQk2XXA05/CyYVb4PB4TSvwqX8ZHQ4Fb9N1y5vHy0LQRDfH3Rm+9 yAktNW/lkktx1vxyi27ilB8M23g5T8siK6VgnydxzbeBbD8o/KYTSK2QZGE+mFyAHcig yvZ27JtV3agC2Q0PJfsvf0OrmWkqEFrOJueis1AnQKSQqNF/G96RURTSR0U6LWTvUeIv r8FR3ajg0NZJvLWWKAnxXJHepM1/r35QLlgoQRtK70cp4gBM4U8lAp6fM1yVi4nfcetA g40g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PgAcGyS4; 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-73251-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73251-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.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:36:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73251-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=PgAcGyS4; 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-73251-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73251-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 DECB5284CB4 for ; Tue, 20 Feb 2024 15:36:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96578763FF; Tue, 20 Feb 2024 15:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PgAcGyS4" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 02C6976051 for ; Tue, 20 Feb 2024 15:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443347; cv=none; b=tH+pNatGVP2nItHs6+170+p5YO5AVMRTblZcf2xj4vajmyfv3W33wIN/YqScFAupIiCWAiMQ2VTTdD7zGyciufvtXJlzAPZnqNOM9HxESOR92YWWtSp/ppmLmLgB3OfRQHStt2cynptAj/TVNUY3Dr2YjD8xb1ScmLMW8k0IUvs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443347; c=relaxed/simple; bh=Bdr6esLRbtemkpFIIDa1y5ugHKxf8AG0iRZ2eQuhhuA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P46+E9zL9eSEC0loy662ugHkakzYFjAi8qYKz6EGoUJemXvqF24eRpzaMwWWPGlkCJDxn32ugvrCEbrK1ODM4zqJsPcqB3GSU2vGpJpyaon9OcpnNoZdiIq/kdFgVSylp5hruDeRW99la84ugc6NA8f6wOnMQCaOfBQjoPmA+1A= 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=PgAcGyS4; arc=none smtp.client-ip=209.85.128.46 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-f46.google.com with SMTP id 5b1f17b1804b1-41270d0b919so3672495e9.1 for ; Tue, 20 Feb 2024 07:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443344; x=1709048144; 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=PgAcGyS4m3MARmG7Pf4cdSb/D7vA5SIgtDC3mkRGsipnpN28tjNxL6hr4TLddZ67+P owTW1oZANz/ZlKYkHO/5e3704isLy+NMOwdchknQfdKTobcFnUZqwq4vQWsuNpsyjy4+ kOqbbbrifaStO8sjkSDeKL6PDPtYkA9/3XcbYeP+AwF28r4fwcKVHdSmIFWArQ76I/aK KUWiYgIR7qElJzu829Qr4ety3HPG3HHObTGjuieMREW0xD+rSimDmwazbNqkFZrPzPMH vQshWmrTkOubhq2odNcaQuTNYK2RtNDLqKnkW5OXcsO1j8nBiLreHYjjqzFeFjzvnj1I hagA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443344; x=1709048144; 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=lWcTcTb5vhHpFnpiFby2RS3/l16SlvirSbMXgnbYwEDaYBAJMJO85PExXXi/o8qlRd FY019c19RpcvXm7ITaaBci4a6xLv/LWhT+dj7+ucSXLN89yvzapAAFvaQc9Z/CDjfpWN 3P4LW8cleb4X12N5yMgaQE45hFNIn1+xvJhRz0GOcPMIGpFBFoVXo4tAOQP0qryLLzDM pl2k7fkRduC4cDnrBAvo72UNW0j2Bi0VadB1XhV435XeojoH2RK+w9jI7WJvtXdZvUhb FrScC+VngA5StKCRHrRotw632fj+1J2ggaHj1HSlIIjQpRYKcazjUOr8xho4aMRz3P6H Dobg== X-Forwarded-Encrypted: i=1; AJvYcCU7A7rpn7Tk2dy04CtK9IgXAx1BEtviaKNv69zOgLlHY+6DaDFauIqjZsLr1JRL+VZmhc8WrO9WrSVs8Q/g5Duy307UlLFEgvlVthZW X-Gm-Message-State: AOJu0YwkiFM+MNYPkgSjSJN3RW1ZP7Sald5ZYrzE9jAngHueu/c/w9x0 15XnjtondneaMZ+LIplFWSIwV6NdRIXuSik90kVrcUTDliAi9LFVbqQO9JQSnhE= X-Received: by 2002:a05:600c:314b:b0:412:71fb:7732 with SMTP id h11-20020a05600c314b00b0041271fb7732mr408200wmo.38.1708443344393; Tue, 20 Feb 2024 07:35:44 -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:44 -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 3/4] backlight: lp8788: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:35:26 +0000 Message-ID: <20240220153532.76613-4-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: 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; + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_PLATFORM; props.max_brightness = MAX_BRIGHTNESS; -- 2.43.0