Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp820722pxb; Tue, 3 Nov 2020 13:29:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoLvnKeL9kAPEg9yKvkX/aAV8Em8549yuaTJ4aSmzS8IB+KfPtZY9AjNCZzu2gc23dcI+o X-Received: by 2002:a17:906:3089:: with SMTP id 9mr9754871ejv.535.1604438965784; Tue, 03 Nov 2020 13:29:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604438965; cv=none; d=google.com; s=arc-20160816; b=zqfR0egkgQYJuJZDRxIeX54rWGt8KaXRctUuixGYBh1XBAUPlTOlYn+NlWlHQZayqi kbLF6IXkBvCUcRdoQ3xZx6KIXmAnny0dp1B7g2/AKwbbp81Imd+wZWM1IjGB24wu4KMD J+Qj/j2VvZjzEJJ0SpmBF9rFbA5kzEDANWpb6hRaGMFx97dcI0+Dvw5o6Hpbdv6A0Gr2 J9GCLK9BTERnQtPVSMHnIokqYrSwCy7/BCfMxla0251PAWnDuyrWOMwwY72Rmmfu8Eg5 p6Np0mUbm50aSCdDBTgUScuAHLmMxNKovf6ErZv2fHVFmh1lMMIBBsMfcp8Mk8+77TVq jP9A== 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=hbiUCSNWaBtD2g8ClJknS1Oo5yBawg3+NGcmR5EVPWY=; b=vat6q8bNMOGQ/8Z/qZEcCjd1ZTJ//Ho9oSMVDvXn2ptL1sNGmdhyWiU9Ve/Gn3p7sg XahcY8bPw16e6D9yyrJEUNVH80TWAsxvpE21YD7T70YXQUsESSixD7u2NFDY4bF2s9ju fqTBpUjY229ihXprviy/NirtlIjQb58TA31axP/JY1ICQmVGmeejuyg1v3gSJIbfFgbH hpOiw/A4RWMSFDrsS7QIOHm+DyJte5LrDEcTdq11T3/+1hj0V5ju+GH3a/bqgSS4xiSP pIUyQN0rj2zw/AWXaVvR16aj/44kOXoT4mi3PbY+nmbiXMkNCaIziZhs6CRJI03a3xLd PoWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Xo/D/zw5"; 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 co16si14060367edb.465.2020.11.03.13.29.02; Tue, 03 Nov 2020 13:29:25 -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="Xo/D/zw5"; 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 S2387852AbgKCVDe (ORCPT + 99 others); Tue, 3 Nov 2020 16:03:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:41142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387443AbgKCVDc (ORCPT ); Tue, 3 Nov 2020 16:03:32 -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 5A350205ED; Tue, 3 Nov 2020 21:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437411; bh=/TsZ6vDLFHl5kFDtbp/dg1/x7AOpjGCa1Ta/8wjJNMA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xo/D/zw5Pe4bDnGati5AFQDOq2n9X9jXpM8Xt11LoqH7zftxjePnQzEluuB98H4Mq ZMLu3WOFlIvtDlbODgMd5pPeFF8ML5r6ihg+7wNAqDrCjcG79Rh29l0g/0+RXrkch7 +U1efyXllgy80WQOID9yAV1o/Oxu4dWU+0qUOzHI= 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 4.19 065/191] video: fbdev: pvr2fb: initialize variables Date: Tue, 3 Nov 2020 21:35:57 +0100 Message-Id: <20201103203240.633443697@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203232.656475008@linuxfoundation.org> References: <20201103203232.656475008@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 8a53d1de611d5..3fd2cb4cdfa90 100644 --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -1027,6 +1027,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