Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp634501pxx; Mon, 26 Oct 2020 17:36:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOE0zIBIJ1VNnwXiuqv3gYqFNOytwv8OvwiFQgnXqC664QDLDbx9q6a1L34u/LSGeJw9uf X-Received: by 2002:a17:906:1183:: with SMTP id n3mr17822166eja.188.1603758964503; Mon, 26 Oct 2020 17:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603758964; cv=none; d=google.com; s=arc-20160816; b=EY2eu1PIpRXhmIJGXRkCApkK/TP0HHDy1zuglS8mNXDWW5DJybvTa+jzxq+EvBBtHP I0adOuTzIYEMfwGvI3NoHwEGJVDZHQsYZoxJefxpvj1jHnyAnAyM8hkqjioYTCIhwlph XrHoDdPXrFi/wut11tdit0uRwPxFcXfAT77iyWboRmQlG/Nb5thInpeLUqy68ydHaqoU lwJ/geY4Q+DDCKG569AtP/xhuENYFbM/J5Li/1D8OOPCBhvDYpc6qYYPNG5cCH6WVBOL Wq8wlHS8HTO9TtaotADXH7nyWsGFx8EZJlf1G7h0QIigSTG2gfIXOOzREmNOAVbfUpSA Ystg== 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=iu8a/DvpheJ3eeetiG0WnX7Q+6FAokcVk7M8GEM265E=; b=tf75Dkr3t023aePmehhLXub9+i8wCFENJQH++3yndFB1GYq4N2T3LCR2s1sYj2H0vD fTKd2YBkn7OsjTWXdbsbCPgrGt2f3J/urqVIXcTjx3HgDUkSmXpM59PsHeSkIdCX3NtK b9FX1q4f3tY2Z2g8BGYQuLEfuTIKpkzVZFBXHKNwuyNFQqEkNQUQMEOX2CrdeU5kwgQ9 Sc0nprsHKNOE63B388Q/PZYtdbaBJ8gJvKXuraj+sVX9nydr00LtBhfSm5oAHY78Rynk R/IreR+caBwNXgA1sBDqbFxjox3iFtJTPM/vlqw0MDsEkU9NKiKahV4RU5YPga0sFq4J q96Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ER1bM0M9; 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 h34si5797238edd.264.2020.10.26.17.35.43; Mon, 26 Oct 2020 17:36:04 -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=ER1bM0M9; 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 S2441384AbgJ0AXD (ORCPT + 99 others); Mon, 26 Oct 2020 20:23:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:34054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410312AbgJZXzh (ORCPT ); Mon, 26 Oct 2020 19:55:37 -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 12B812222C; Mon, 26 Oct 2020 23:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603756536; bh=hW8oAgtPCSp1/+yVU3mvQFbxtOKPmK/KoxuZzgXE32A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ER1bM0M9+Z8qDIsYP4UZnjvudybCaLg55AqUR7LlkoZnR8SSde5jHPKZsUcca+y/7 wiRQ/Hofe+gjbHQ9K4dPpWf/LVBv9+Mw3bJQlaZq8Un2V524UyuJZ04395kYCsOWYp rs0c8b7Rr2k3EYMpm/on9K8AYvlwp4XgSZ9vPOqc= 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.4 16/80] video: fbdev: pvr2fb: initialize variables Date: Mon, 26 Oct 2020 19:54:12 -0400 Message-Id: <20201026235516.1025100-16-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026235516.1025100-1-sashal@kernel.org> References: <20201026235516.1025100-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 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.25.1