Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4042446rdh; Tue, 28 Nov 2023 10:10:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoiO630tyRNz6xqD9WtiQhkkM04Rm6ML83Rhvg6j7Qh/ugQb7qh85bI+wBZU08UdwQCsAI X-Received: by 2002:a17:902:ee82:b0:1c6:2ae1:dc28 with SMTP id a2-20020a170902ee8200b001c62ae1dc28mr16392717pld.36.1701195053403; Tue, 28 Nov 2023 10:10:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701195053; cv=none; d=google.com; s=arc-20160816; b=l0cTXcAPuYCqwCwrl+ddPVVh9w4y8UoF3ONIVeIqv4LItKjPaa15zZTdg6lS+v9m+t IkUQvtikQMybqhjpsU4Jm8kr5kh/wXLQZuensETl3xb3g9tUzA4Lcqqx5KiEFZjD5U9+ 2nTwkKWknGQBxxVqJQEfX+e+Kol3GY0oCZ/67FBr8n/I5dCoNPXRvB6O+SXhQnnuSG60 rBUhNPjitDdVSFw7/bu4LeRhfOAvcoe27GN/nVU/bgNhndPaTX0A1+9kkHiS/jnAKiFQ LCtYo24OwiL31Wg3pz6ljQRZlPJRvSmFKIR54iXmkOB79aiIlSvxzlMRQEUZ8uhBiyib rSdw== 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=f2GMrLcGcuPvxGptutNWB7kt5k9GOKF04a50so4967s=; fh=CdRevyRuD2UYKSWD9k7j6JRmPi7PRcYnGcIEA4XJkps=; b=BwdFXpjAsRjx9J0hFkRN4lIs1S/Wxo6CUT92lHMNaK5o6PkYXdmOVrIjxh9uEHLZmt gdlxxqWKx9pOH8CRABTSbmGFBUsk1z2Vco5aZZK7KBYwQ5oWULBkbloeqB9xYcjw06N1 gea5FLgrCIs146crZbXnIyk/RUI15ggC/MV91xKdXff946ZIbNILc1NBsKhtBFjM9SDN 8DeFQ7XERG4QIFAl7CuClQ+TcBmwT1FaVjdmcM9Z5r1UftXqptOT8yvgUC0+FuinwoZr pFqGlf87Bw51j2X3hm3Hlo5DUGESncdoks3aGsKX8Oz3ttC91osg7JXhLk05YzWHRWmc BcUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Thc7w8Ax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a5-20020a170902ee8500b001cf50ef35besi12189153pld.51.2023.11.28.10.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 10:10:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Thc7w8Ax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 27F70807F49A; Tue, 28 Nov 2023 10:10:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345467AbjK1SKI (ORCPT + 99 others); Tue, 28 Nov 2023 13:10:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233170AbjK1SKG (ORCPT ); Tue, 28 Nov 2023 13:10:06 -0500 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23B61B7 for ; Tue, 28 Nov 2023 10:10:13 -0800 (PST) Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-423d9d508d1so5678721cf.1 for ; Tue, 28 Nov 2023 10:10:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701195012; x=1701799812; 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=f2GMrLcGcuPvxGptutNWB7kt5k9GOKF04a50so4967s=; b=Thc7w8AxMhkvw1AgQt2C6X/i5Fxlz7UPepSBc5NHpyXfhDLfoxuO/MLLXXI0Vl61qt gsoxwR1PNM5WFUv1PV3ViisDy65V5Uv889ktHMQu5B0WuwWNYeMa7ehNoXzDPB3B1x6v VjuTFtMDzXVVqIxJosMtvgq/CFJ2UjblHTqZJ1FtJLUCZ+TDrHHdoLMM8R8mIlEbykOV Va0Evs3OODqMGj8IByH0YLHqHCob3VkfNusz0M7ho3vfDtj/l08lwJy0PJigqRvqhcQS 3YcmG70SJP0iL25XTZ9wjJBufB5Mv8nfgV/1ux/EiKe/gc/c9FtCZadNnym8OwhgV8fW mDhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701195012; x=1701799812; 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=f2GMrLcGcuPvxGptutNWB7kt5k9GOKF04a50so4967s=; b=sTJ5FKCp1aSgqXZ+DEB0XhJoxZEAuwesxAI65FRNxvfGbkHoys+sojmvoVDZfRrMQu J7Xf2LFHfSkJZgDangY++e193Z6W2Ken7P23+Su9ggGdNmmJOxtg5VXuk8/xt55Sch5A GF78k8uiH4LsYNyUOu1k66Rm6T3QHDMPdpvfSynS3QtYZfVV0BhSxKGgGcHBFAJE0rmX xgUp11zSleuK+LyWuL629TAQT+18QHEbSexKELYR6khR2D0m1TFtXieP5g4prF9vNKf9 Whw9QjRpgfg8XumGoYfroFZhSLSshrLjR106anJI7zC58nYTUkBt3uJHnGLiYfO/KULu O2Ig== X-Gm-Message-State: AOJu0YwZRqT3yXsxC58GAgPML/EM+HUwgfgwGjazld/PDGmbzeFuf/HT 0U2ig6ePhjRSBS+m9vcyIN3SqQ== X-Received: by 2002:a0c:ec4d:0:b0:67a:3efd:d6f6 with SMTP id n13-20020a0cec4d000000b0067a3efdd6f6mr8466084qvq.50.1701195012288; Tue, 28 Nov 2023 10:10:12 -0800 (PST) Received: from aspen.lan ([209.120.180.235]) by smtp.gmail.com with ESMTPSA id t15-20020a05621421af00b0067a4452d459sm2164807qvc.116.2023.11.28.10.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 10:10:11 -0800 (PST) Date: Tue, 28 Nov 2023 13:10:07 -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] backlight: mp3309c: fix uninitialized local variable Message-ID: <20231128181007.GA4431@aspen.lan> References: <20231128150839.2605003-1-f.suligoi@asem.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231128150839.2605003-1-f.suligoi@asem.it> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Tue, 28 Nov 2023 10:10:29 -0800 (PST) On Tue, Nov 28, 2023 at 04:08:39PM +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 (thanks to Dan Carpenter for the report): Good to see credit for the reporter but please use a "Reported-by:" tag for that. There should probably be a "Fixed:" tag too. > 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". > For consistency, I also initialize the other similar variable > "prop_pwms" in the same way. I don't love redundant initializations... but I can live with it ;-) . Daniel.