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: 1979688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=JWUEX/wk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=139.178.88.99; helo=sv.mirrors.kernel.org; envelope-from=linux-tegra+bounces-3600-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WyDMS6rWNz1yXY for ; Tue, 3 Sep 2024 02:13:40 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7F010280D08 for ; Mon, 2 Sep 2024 16:13:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4F531A3049; Mon, 2 Sep 2024 16:13:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JWUEX/wk" X-Original-To: linux-tegra@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 707E61A2627 for ; Mon, 2 Sep 2024 16:13:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725293617; cv=none; b=uwiVZ7QjfqDQ/GXL1ZJKaZ+7MUaf4wrLqJPV5B2V945yWyod7Bov7pMcnOV6foasRPy/9u0z+EOAEAvt3qAMpqWxZJU4cZkg0cokCFFNz6L/nvxTU54k7TX7qzs9UGi6mMo4k60YfordmZr3jO/28zfWDXXmPIFKQlgosnJ3RHU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725293617; c=relaxed/simple; bh=y9nzKmp6uHS9PIhToRGVYR3zjbZM7i37a84XGDDhGVE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fYINyTGYWGDbaJcEzkvviifAL0elvQLoATRyIkuxc1nspjifIoizyIgM/8D1jB6GIESeE592Ib51eFyihnt8QAkRjqjzMP+6crWa1WfEQIL27DIe6HT+Qak5oK+li49M5DHWSVMhwu03QYSXM0VcG2ts2w/B8SYfgRUkYtHHCwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JWUEX/wk; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com 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: r0sbl02tQf+5NV7DPxSoUw== X-CSE-MsgGUID: kzTisuccSp67d4OFJdzA0g== X-IronPort-AV: E=McAfee;i="6700,10204,11183"; a="23447394" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23447394" 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 Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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; /*