From patchwork Thu Dec 1 09:07:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58C23C43217 for ; Thu, 1 Dec 2022 09:07:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A43210E586; Thu, 1 Dec 2022 09:07:44 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 02A5810E58A for ; Thu, 1 Dec 2022 09:07:39 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5CDBE5C015E; Thu, 1 Dec 2022 04:07:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 01 Dec 2022 04:07:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1669885659; x=1669972059; bh=FFDvQf0/oCpeWjcrkp37qrKaI CtOpHzT0UwDmf5qNcA=; b=DGiEpIin24ErLkvXszy+qG74blRNR5J2EwUddh2Ka EaJZW6cqq/znvlNiJwWpFGStfk470CJNpxN9WrNS27J1Xh1IOP3tFhmnZd1yaJ84 wfU4eIntt1aRycZ5xOh1p3sIDLZR8OK3tS3I8PdR5dtRARbKYWYUZ7ZXL1aScggV oxFHq0HwHhL+aNHddLcbIH49ybW+n6PBLoEl7lKZ30iL/Vq+YfMsJnf9/BJlTjyY TdEpO3B8gx/3KnJ2/tNgxVXa93KuAY2VTQAv6sR8SnVRVjEGq64r379PKryTux5N 8K3Km8+eNkawj3RDj/oer5ZirJV1niZcwU7l/CmtlAUtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1669885659; x=1669972059; bh=FFDvQf0/oCpeWjcrkp37qrKaICtOpHzT0Uw Dmf5qNcA=; b=Qdf7ewWl5wCSQiHJpP/tu6p3JJx6PfgS5ofQ3hIdPw83jWW+dcQ 4S+As98WWEnb2eScNxSWqmW6Ehuzvib6CBnMI/l43StcvUclZ/nbvVQXAxdh7ygX t06PHoy9CEjwwfdvF8d8GHizEdBUut9A0ghHCdhScouynIWbmapmKjb2te7WscZN ydEnirpsRIvgne8taoWxJOt+1D0G5lcZqXmmTjhQEvFXPftNWSrCmNbJQ3ORE2WN bU+g5+GwyDUpj7tK0uoKETwOZb1JcUu9n4Co2DJvaWgeo52ZRx99p0efjpPDLLLR 8Iw/gzwY42DYKSh8ABr3TucS7yrq+bWzqwg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeektedujeeijeefhfejuedtudegtdejffffvdettdeigeekffeileelgeevgfdv vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 04:07:38 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH] drm/tests: probe_helper: Fix unitialized variable Date: Thu, 1 Dec 2022 10:07:36 +0100 Message-Id: <20221201090736.290935-1-maxime@cerno.tech> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel test robot , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The len variable is used while uninitialized. Initialize it. Fixes: 1e4a91db109f ("drm/probe-helper: Provide a TV get_modes helper") Reported-by: kernel test robot Signed-off-by: Maxime Ripard Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tests/drm_probe_helper_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tests/drm_probe_helper_test.c b/drivers/gpu/drm/tests/drm_probe_helper_test.c index 7e938258c742..211131405500 100644 --- a/drivers/gpu/drm/tests/drm_probe_helper_test.c +++ b/drivers/gpu/drm/tests/drm_probe_helper_test.c @@ -115,6 +115,7 @@ drm_test_connector_helper_tv_get_modes_check(struct kunit *test) ret = drm_connector_helper_tv_get_modes(connector); KUNIT_EXPECT_EQ(test, ret, params->num_expected_modes); + len = 0; list_for_each_entry(mode, &connector->probed_modes, head) len++; KUNIT_EXPECT_EQ(test, len, params->num_expected_modes);