From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C99E779FD; Thu, 11 Apr 2024 10:35:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712831703; cv=none; b=UNxqHNIDAaxSAzlaaB8phGerrxZvt5n+zlJtkn16N6LM2W7UeavOhsMW5RjyIJaT8wgWNXH16HG3y16STl7Ae5SWKL56x1224WKgPG4Tcm9v7UgMgAWd5SoTlmOXqL8/QfMygyqYjL2x094Km4AfR/auMpIh+2aNDhFZLu6HXD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712831703; c=relaxed/simple; bh=AF1oUdv3ksbf/oM5TFgfIroi0vMQKA0eiDmMzhDYI6w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a/zdNsgahmHpfUhkrF+zdmPjObz4cxCn/7WV0AQm5mT1rSHQedGCMIcHE82bJ2uokiONwKTYqaxc4ZH2CIslv8lREerldJnkgBQDQFtD5+66Bizh7XoDxAiXZUxPh2z5XCUh0S73c7A+hpvY9t/8Ttr2hh9H2NonckaE2pxTbiw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FGO5dRKz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FGO5dRKz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F153C433F1; Thu, 11 Apr 2024 10:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712831703; bh=AF1oUdv3ksbf/oM5TFgfIroi0vMQKA0eiDmMzhDYI6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FGO5dRKzfSTdWGW3RKDwa/1hRxqGKkKQ+3Fo9HJ3Gpnfju0Ak2p9HaYug2Ue8aM8i Qloy90fS3SqE9i8N4Ydd1a+SZKTeTmHhWAygVBi+6XSXywF2OhA4eskZadL18Hcjel +VAVDk7c6J4Lz/mEYEwyatcw8ky6ALZypnTVrh/8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Inki Dae , Seung-Woo Kim , Kyungmin Park , Thomas Zimmermann , Jani Nikula , Sasha Levin Subject: [PATCH 5.10 097/294] drm/exynos: do not return negative values from .get_modes() Date: Thu, 11 Apr 2024 11:54:20 +0200 Message-ID: <20240411095438.596096651@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411095435.633465671@linuxfoundation.org> References: <20240411095435.633465671@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jani Nikula [ Upstream commit 13d5b040363c7ec0ac29c2de9cf661a24a8aa531 ] The .get_modes() hooks aren't supposed to return negative error codes. Return 0 for no modes, whatever the reason. Cc: Inki Dae Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: stable@vger.kernel.org Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/d8665f620d9c252aa7d5a4811ff6b16e773903a2.1709913674.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Signed-off-by: Sasha Levin --- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 4 ++-- drivers/gpu/drm/exynos/exynos_hdmi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index e96436e11a36c..e1ffe8a28b649 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -315,14 +315,14 @@ static int vidi_get_modes(struct drm_connector *connector) */ if (!ctx->raw_edid) { DRM_DEV_DEBUG_KMS(ctx->dev, "raw_edid is null.\n"); - return -EFAULT; + return 0; } edid_len = (1 + ctx->raw_edid->extensions) * EDID_LENGTH; edid = kmemdup(ctx->raw_edid, edid_len, GFP_KERNEL); if (!edid) { DRM_DEV_DEBUG_KMS(ctx->dev, "failed to allocate edid\n"); - return -ENOMEM; + return 0; } drm_connector_update_edid_property(connector, edid); diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 981bffacda243..576fcf1807164 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -878,11 +878,11 @@ static int hdmi_get_modes(struct drm_connector *connector) int ret; if (!hdata->ddc_adpt) - return -ENODEV; + return 0; edid = drm_get_edid(connector, hdata->ddc_adpt); if (!edid) - return -ENODEV; + return 0; hdata->dvi_mode = !drm_detect_hdmi_monitor(edid); DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n", -- 2.43.0