Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3212697pxb; Mon, 9 Nov 2020 05:44:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJydnCD0IMiEG0gxizuQ+4znWmXzVA1Qpju7ttO55maGQtIGKSgchnCZJbI2x9pwjTw6v5I4 X-Received: by 2002:aa7:cad6:: with SMTP id l22mr15576948edt.229.1604929467575; Mon, 09 Nov 2020 05:44:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604929467; cv=none; d=google.com; s=arc-20160816; b=EKGmcaE51VsGpOmKjJhTDzodz4ejOAaEJpiFR/xgdfHJwBo6y7ytPE+4wnNCcUva1k ueAhiYJx+a5yXhIWJz6CNnxU2NdhKKvF4znkZI9C65F+Cpg2A8vyQZ2/jH7uAvFL0IXm giaTuBdUopdCalOZ6hGfqz7gfo8CgerWAc7v/ybdZ4IfcnC49fktUgm+zV+vxJsz9hH1 wilS8POwsA+6fYn5T8HfyIIH7jVOdu5v2zRv0Z6QsoRPY6zpfG3ysaDfTJOROnIdxB8O 2mBmpQMBxhnKzrC8ANacVciDJwjYQDIAOEzHdRwX3kP3WkdWI+9iWtZIDHz+2PewYVK1 KxBQ== 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=UCnZXlwZ092n/4oNeDSBWuur3RQmO8Se2ZvjaxyG1QI=; b=V837CCTgOJ5RWNPsTtQU7mhFv5tlFaKCU1YP3QZ6oSQHoGiZ5m4j66w/MOrmRBnH1v 84cQUGoqgT0FPir6FvcFYLb0Y2UdLuwccd7VwFhZ6JnB24UZ1yc7V7rNehpG8ieb3q16 c9HoVdDZhq9wyXsxcbENCxof3yDZTsIEHFQbrsF3KLjKMjVtXHpht8+gBeY7rUGwJdo0 VVGXfyhT5rVOcMEjUZHCX1RZr4YqMrbaRzpHuI/0jVxnpOLtWhZYxCWWK4NzT6BCRcwh HfMd+P4Rb7UOUyU5K8/EFlBPQUxtgATnZWb4ACsB7vTfafOc05/kPdkQDtW/4sm5ct9d 8mMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ftvWP+Et; 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 b6si7205390edq.479.2020.11.09.05.44.04; Mon, 09 Nov 2020 05:44:27 -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=ftvWP+Et; 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 S1730518AbgKINmo (ORCPT + 99 others); Mon, 9 Nov 2020 08:42:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:54884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730343AbgKINAl (ORCPT ); Mon, 9 Nov 2020 08:00:41 -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 8D51120789; Mon, 9 Nov 2020 13:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604926841; bh=RtdrrOHxuxtK9Z64h9hB+apj90RlM8+bja2u1N6Vhok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ftvWP+Etj9PnDaHYiBaAUpAnbxOfKSDz6Ei7yFLhHdFIyCPWWoEQOWYkrHkATFYf+ fV478l+wnqr4u8tPs6L8Eh2+vO3qf6v3tAA8pz2uWO3QyxVNiRKreKM6O+eCZ6dlNe VpzS7ib1HwWzWffvf8w3cmKjhpm+A7a0KjXy1b60= 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.9 023/117] video: fbdev: pvr2fb: initialize variables Date: Mon, 9 Nov 2020 13:54:09 +0100 Message-Id: <20201109125026.754543907@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125025.630721781@linuxfoundation.org> References: <20201109125025.630721781@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 a2564ab91e62d..27478ffeeacdc 100644 --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -1029,6 +1029,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