Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp870976pxx; Tue, 27 Oct 2020 02:32:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGYryZl55y89gIll0+/CYp1HLcE+qYMcnt9CWEXMNT9t7hs6ImEyG717TSU6Zqc+Q1JiOR X-Received: by 2002:a50:c38e:: with SMTP id h14mr1313235edf.174.1603791125706; Tue, 27 Oct 2020 02:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603791125; cv=none; d=google.com; s=arc-20160816; b=jEoIPHIBK+SAk+c0pYBnotQSLxZdq8wwGoTItHAR22YVgVeFwHbcPC7TqYfuyQE8Mx t4hF7Olvd2GHbkNMY8HCtsOZT2bQChCr63qRibp05RbHHPysobur84PKdjjYiEP4rQop bM49x6bFIsR0Y8rC3UcpA8dX0IXqrrkmaiMO7aS4nqLZH0r7V0/Kt6CB/8vkjMj2rvNk 2Q+stni9CT8AJCO2HSqJYqhtmj+BB87I2JSAsLAHMJJqyhDWSQ8odbHm6Ph8pl83Nm1x CPY9buY4GMnupOj+1aQuu05pmf++u3to1grnNUYutCUMy3cUUWDPlGow3oTa5oYmpiMQ mOyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RS7LGBcdhBLAUz7cEDroJEIERTkMNVs6B6EG3/7TrFg=; b=BltylD9sfCRR5dI2fHqu5EWLiVgTwsTj/Fvb+GWijyzR8wzFMLOAPpBuPwo46is2XL SKw1PvjSyfHPBwpo5xWb92jnZKn0xM/SeJurrvFon3Hq9bGcTwsPSlaOE+2qgrs1dyZY Q+Tsb58JkQopVC0/zDZ4QFzWcp0//RJO2TwPGg4AUyMvslVLQK5HKSxXXXXt8KTDfWP0 8kSSMtZf1SoRyq4dhHqfgKEUAPgLUcp/DLjuf+mocqiX59+bVWESyRBQSyYL6eMQ2bKg XKAtGNejBK5ZFD3MFJ9NSB8Z3nuyTaxFWzMju3rz2z0xbZ4Hv9fqwGS4yyqrVbyExLGQ FAsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XVxJQetI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si563118ejn.501.2020.10.27.02.31.43; Tue, 27 Oct 2020 02:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XVxJQetI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409043AbgJZXuJ (ORCPT + 99 others); Mon, 26 Oct 2020 19:50:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:48238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408796AbgJZXts (ORCPT ); Mon, 26 Oct 2020 19:49:48 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87AC9222D9; Mon, 26 Oct 2020 23:49:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603756188; bh=W2bEeiQAfoQioyqsnBUOJWlPraJVYRnpniBcf1u+A3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XVxJQetIutCf6pWSF4NWuYMWmcHldexAM1Q0djcfge4o1TRc9LaMhg9g2kQgGjEBZ K2/Mjt6MGpCAdiohMYKePXUtNxL/xum794pfFH7Etjnc4GMXWE6sYg2MapDDcrlnYc FdXthSkmLZE/JU5R9q8tl54HFeTo7l49ARaVmOsc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tom Rix , Arnd Bergmann , Sam Ravnborg , Sasha Levin , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 5.9 034/147] video: fbdev: pvr2fb: initialize variables Date: Mon, 26 Oct 2020 19:47:12 -0400 Message-Id: <20201026234905.1022767-34-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026234905.1022767-1-sashal@kernel.org> References: <20201026234905.1022767-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Rix [ Upstream commit 8e1ba47c60bcd325fdd097cd76054639155e5d2e ] clang static analysis reports this repesentative error pvr2fb.c:1049:2: warning: 1st function call argument is an uninitialized value [core.CallAndMessage] if (*cable_arg) ^~~~~~~~~~~~~~~ Problem is that cable_arg depends on the input loop to set the cable_arg[0]. If it does not, then some random value from the stack is used. A similar problem exists for output_arg. So initialize cable_arg and output_arg. Signed-off-by: Tom Rix Acked-by: Arnd Bergmann Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200720191845.20115-1-trix@redhat.com Signed-off-by: Sasha Levin --- drivers/video/fbdev/pvr2fb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c index 2d9f69b93392a..f4add36cb5f4d 100644 --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -1028,6 +1028,8 @@ static int __init pvr2fb_setup(char *options) if (!options || !*options) return 0; + cable_arg[0] = output_arg[0] = 0; + while ((this_opt = strsep(&options, ","))) { if (!*this_opt) continue; -- 2.25.1