Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4721706rdh; Wed, 29 Nov 2023 08:53:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEF7t1gRk66CHA/nX7UTePVP8snJdLYIsTbRH7wFNx5W69yIAgw7+HUdskd/+7lCDM25tj3 X-Received: by 2002:a05:6a00:2d18:b0:6b5:ec98:4289 with SMTP id fa24-20020a056a002d1800b006b5ec984289mr19981135pfb.14.1701276799027; Wed, 29 Nov 2023 08:53:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701276799; cv=none; d=google.com; s=arc-20160816; b=wmPBMMdfDEvZuFPr5pk/RhRieIBaYatu6K+8fUYWpNFcG/5DNtPWcxZGA6gRbWcjML 7lt746JZV5GjHLqdFnBOwfMlRbJOH0Ifyi5E6DtPKpvJLl5PkoTHy83VTsNIHptUEOyZ ud5+DqR5L7oG14Tb/aI2YxcUVP+nJMe9gCe177CZXNNlxt6aUePjXK8EZNBzFFx+S9jO SL2hFejOxmYv44WLBKuHiBf9l1TXS5XOgCatlvVjzha3T69EqUminoefnP/ZFXZF4mDl owPd9r7A94s+PczrBB0QdyrblfwCZC7Z+8QlJSaA+opcAnotcv1jWQJ2MXd706dS++xr AkkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FPGbfDWwX47hn9c1TMZWvz82zmR4+7EsCG8Vv2EabG0=; fh=CdRevyRuD2UYKSWD9k7j6JRmPi7PRcYnGcIEA4XJkps=; b=ldVj92LauvMPk0aGBnfp6Hfl0Moze5y3s18T21EnXBHsuQRpmTfDlLz4csxueDtW5K Wdya8drB1biW/RiUzymTkaMfTRyKGYnlVsYOW+89xiBmIUTkbfv4y7pPdSn4Ljt77cfa bgqHx6HoENP02IYhCkSSUsiGemKDOcoMAjWqp5rtJZFj3BD9HVo2yBc5k8HAd77IQadW cXAZQEHBMMiU7vN8esI7GjrW6+I5olpoEsr4jJpcaM0A6BrAijC6qK/3JAiezYr7GSXZ 4r8xnHwAHa0M7uiWt+EcJ7a5L116VyAlxup2Lsfh4OXDUk6ckNHywYFpD8Q455kvQZ5l 9LYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SN4hC+FN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k18-20020a63f012000000b005c5e2331ba9si4470374pgh.324.2023.11.29.08.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:53:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SN4hC+FN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EFA5580B01E4; Wed, 29 Nov 2023 08:53:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231367AbjK2QxG (ORCPT + 99 others); Wed, 29 Nov 2023 11:53:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjK2QxD (ORCPT ); Wed, 29 Nov 2023 11:53:03 -0500 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A436B6 for ; Wed, 29 Nov 2023 08:53:07 -0800 (PST) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-59b5484fbe6so69677037b3.1 for ; Wed, 29 Nov 2023 08:53:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701276786; x=1701881586; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FPGbfDWwX47hn9c1TMZWvz82zmR4+7EsCG8Vv2EabG0=; b=SN4hC+FNTDurfIyFfIsHAfkfZ5mqCfFrrK7epLVqG2cuH+DzfdmN2xJIzzqPKbG2pF feq00LXuGCjMHsqd2S7Vz+0mZ7FI0pzllRkFRR3eoIDK0OpYq2jn0UwrGZQ5B2XF/gIJ XaUULQLHf7+Va4xixfPcGsXg/HLFr6NBXBhwhMDPUSnf+2DmubJl2JL4c34jClrZ1g3B VsVuWxdw7UfbRU5VXxiww1yWbQrZITj+vw5zUUr256LVGZNfMKeV+tvWxbDOMMygXaqS V6K6CkSeHN7XYxcjCjc0PkAdFje1zFdhbns/kppQLdmke0y+JWGSRso5UftegeuOdYoo 95Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701276786; x=1701881586; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FPGbfDWwX47hn9c1TMZWvz82zmR4+7EsCG8Vv2EabG0=; b=ApxLRezcTWW7UNbdn9M4RHct8hhR6j5MwfbXR8Z4zGzmnsln+on0Wzy7ChIFFChXEz 9+zK0QUHtdDlUhKHTlFADUJ7NyKaHYkk/+J9pEUG0z7uhEPx69CsBC4k4Iz0ee9xqXNO 1fHNjO+8GmF/v/5PMQLnftVGW+UXaM7qUdhweI7ZusXvIcKMKvp3byqbouE8498NRy9l sHJG6HMYihzmoKFVx1T8HXq3vbHGMyv/t4NaBBQdpHjm2fDX2g9bKNBabZULrhvrt7gc kkvVfFIyU01I05WUIyzHnds/W7jMhLeRcSE+Ndb0rcvtMJiTSmBgyIaxqTt+7wGFp41j lg/Q== X-Gm-Message-State: AOJu0Ywp9aAKhJTtw/P29/syd8XA/M7RG1++aIudR6WBtZwuzdMnygx5 kbV2EOQcTZHYNl8txu9/4oPbMw== X-Received: by 2002:a05:690c:26c5:b0:5ce:2148:d4cf with SMTP id eb5-20020a05690c26c500b005ce2148d4cfmr17974677ywb.7.1701276786078; Wed, 29 Nov 2023 08:53:06 -0800 (PST) Received: from aspen.lan ([209.120.180.235]) by smtp.gmail.com with ESMTPSA id kd26-20020a05622a269a00b00421b14f7e7csm5700786qtb.48.2023.11.29.08.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:53:05 -0800 (PST) Date: Wed, 29 Nov 2023 11:53:02 -0500 From: Daniel Thompson To: Flavio Suligoi Cc: Lee Jones , Jingoo Han , Helge Deller , Dan Carpenter , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] backlight: mp3309c: fix uninitialized local variable Message-ID: <20231129165302.GA18064@aspen.lan> References: <20231129164514.2772719-1-f.suligoi@asem.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129164514.2772719-1-f.suligoi@asem.it> X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 08:53:18 -0800 (PST) On Wed, Nov 29, 2023 at 05:45:14PM +0100, Flavio Suligoi wrote: > In the function "pm3309c_parse_dt_node", when the dimming analog control > mode (by I2C messages) is enabled, the local variable "prop_levels" is > tested without any initialization, as indicated by the following smatch > warning: > > drivers/video/backlight/mp3309c.c:279 pm3309c_parse_dt_node() error: uninitialized symbol 'prop_levels'. > > To avoid any problem in case of undefined behavior, we need to initialize > it to "NULL". > > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/dri-devel/af0a1870-693b-442f-9b11-0503cfcd944a@moroto.mountain/ > Fixes: 2e914516a58c ("backlight: mp3309c: Add support for MPS MP3309C") > Signed-off-by: Flavio Suligoi Reviewed-by: Daniel Thompson Daniel.