From patchwork Mon Sep 2 16:13:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13787477 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 74FD8CD13CF for ; Mon, 2 Sep 2024 16:13:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E93F58972C; Mon, 2 Sep 2024 16:13:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JWUEX/wk"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E6A08972C for ; Mon, 2 Sep 2024 16:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725293615; x=1756829615; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=y9nzKmp6uHS9PIhToRGVYR3zjbZM7i37a84XGDDhGVE=; b=JWUEX/wkY3knmyStL/WGE1tqPz3IBTk+HyxxpxJ6z4W17h7MddQj1daY DH01k3YxaF8JzApJGvj2nBte6XcaHBkJTWsbbnAj6VKi+2jBuosKLXUzp kZvvGQX4B8CjHzkMXfm3hqhxk3lyc9pCm+nKMAhFAGGEvvqWdVyjO2rGZ dwd2gAiFtBIwUGhoOEufHwsrB/IgMSwHmEEBQ1la8rK3sHQa7SQlVNPcB QMVnf+mY7n2n9Y6IpGhtXUIAXE2jpUJlqd2Lzdk2m/BTOegPHZJHV/MTh 4Ef3TcGk+LIBqBKkYcTc4DK7qxZvdaCfWky0DS1OZ92azWzIMQHsqJUsy Q==; X-CSE-ConnectionGUID: S+XIQo1RRbujx0D3dLw3jg== X-CSE-MsgGUID: 1qkJG3+ORW+Nc/84JCwdHA== X-IronPort-AV: E=McAfee;i="6700,10204,11183"; a="23447392" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23447392" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 09:13:34 -0700 X-CSE-ConnectionGUID: 680zeTzfQE6Dfo57Si2mUw== X-CSE-MsgGUID: IJXoQuJgQEeKERmpqflBYA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="102098066" Received: from ltuz-desk.ger.corp.intel.com (HELO localhost) ([10.245.246.4]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 09:13:33 -0700 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: jani.nikula@intel.com, kernel test robot , Thierry Reding , Daniel Vetter , linux-tegra@vger.kernel.org Subject: [PATCH] drm/tegra: fix potential uninitialized variable use Date: Mon, 2 Sep 2024 19:13:17 +0300 Message-Id: <20240902161317.2437148-1-jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It's likely either output->drm_edid or output->ddc is non-NULL, but avoid the uninitialized variable usage anyway. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/ZtXLyXxew7z6H2bD@stanley.mountain Fixes: 98365ca74cbf ("drm/tegra: convert to struct drm_edid") Cc: Thierry Reding Cc: Daniel Vetter Cc: linux-tegra@vger.kernel.org Signed-off-by: Jani Nikula Acked-by: Thierry Reding --- drivers/gpu/drm/tegra/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c index e6b5863fec71..49e4f63a5550 100644 --- a/drivers/gpu/drm/tegra/output.c +++ b/drivers/gpu/drm/tegra/output.c @@ -21,7 +21,7 @@ int tegra_output_connector_get_modes(struct drm_connector *connector) { struct tegra_output *output = connector_to_output(connector); - const struct drm_edid *drm_edid; + const struct drm_edid *drm_edid = NULL; int err = 0; /*