Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp829158pxb; Tue, 3 Nov 2020 13:44:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTpvO6AAEzN8cI/rsojvyANI6oQq6TX97bGHvNadACBnbv0SkiDNXzxXih4PQQoD0XlFwy X-Received: by 2002:a17:906:d0cc:: with SMTP id bq12mr21757044ejb.127.1604439888943; Tue, 03 Nov 2020 13:44:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604439888; cv=none; d=google.com; s=arc-20160816; b=w174Sw4tsUtVCxXpEx/F/CZDOOw3f9KbxqjFFcY4250lQZ259gTdtp4ogqrnGg2ONx dkmvDwfhl2NTGllUkj9Irp1Uo4wv/NuYfi4Rj3obpqMZjoW4naavdVosKHEOS1qGdFVY hvXrhJEhIZC2sWTj9K0r2fu1HVp73JLaaHocosacIR4dttLlZL79k2J/ZIDtvwdkeFmj bnMA2tD5QUFworX/d3Y2ogOWgGJ+gEzKkcMULsWhbfkFa2M4VU/5hHbtKr1o5+E34pVg OscUZWHrr7Dma6fYuc6uF42jhbeCCpn9ykQF8OICBURPK2C2uy+2cwJ0D4E1LMX3cUQV zNwQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A+cX+IzjOpOUuJI20peBxzUIyjSJaUMg6e/53rDmIG4=; b=gC61TRI5kbW7uthvOP2rBwgLM2+8Xpf5gQj45fiDsDf5WYprwtpPs2gLY22ZkaSBVi GHbG358G1FbUQPELW0A6+qV+mCSmiKnW/Sa9ZzSgBTSSdRJVXwva0U2EJXivWWSDR5wO pvhRaASh5iRH032NthvM6ULR4kB5jU287EMyxPEj3/BF9jly/MU5h4Jqy/bAkL+RxqY9 AtJ3IwHwhbS+KsecBC2W+k0Wzwxg1/slGrADBhd1dPVyXcNEweiYro8jTo6JjGg0Di3V BuhDiNQP1SzzsgAlLnohNYojxJTwwiOGnQuqskdWRN/G9Q1EtPumOstLqtBKsTMizxsd CAMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NcxR+Rph; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t18si44816eje.652.2020.11.03.13.44.25; Tue, 03 Nov 2020 13:44:48 -0800 (PST) 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=NcxR+Rph; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730830AbgKCVmc (ORCPT + 99 others); Tue, 3 Nov 2020 16:42:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:56148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732334AbgKCUzb (ORCPT ); Tue, 3 Nov 2020 15:55:31 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 00D92223BD; Tue, 3 Nov 2020 20:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436931; bh=XnYA1QIdRA55JZUyQQp0PDa7+crtbkaPzu+EXOaXmNg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NcxR+RphhdBl64A2EVyXg5R/0RSfyptrjp5j2x9ej0UKaf7Jv8KWIcYhSsT6c0ZsB rrt4VAgvdwJ58pksZvqxk8k7cD1MUW/7YtPl3GVO+QGnzF5KeXyhLo3gnm2f3fp68j +gnTZpWRgd1uTx+rmlEGAJvcOhBIufGjAgiabews= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Rix , Arnd Bergmann , Sam Ravnborg , Sasha Levin Subject: [PATCH 5.4 035/214] video: fbdev: pvr2fb: initialize variables Date: Tue, 3 Nov 2020 21:34:43 +0100 Message-Id: <20201103203253.379247598@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 0a3b2b7c78912..c916e91614436 100644 --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -1016,6 +1016,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.27.0