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 77C8E383BA; Mon, 1 Apr 2024 15:58:56 +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=1711987136; cv=none; b=VZIv2Dx3yRJWiGctSKs0ZlvlckodSMArOw8IbofVRN93BmF7SU+7i+/6MhYhlc7vEDwZ5hexG89cEa7Uz0Kh6b3V1bNWzYn4iyerQY9WrZlSH3ZkUvLMZRyMJP0K0KcIul9ayqzHVe0hJ8xUou0gnsbgZv1aCQKWS/rSkdgvgp4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711987136; c=relaxed/simple; bh=x0RYt7Vt5dtLE5MWqDVc3zJg7P5hSdoaiOxA6nh2t3M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lrCI37dCtZuIi74gCm3I9UqqjxzALByaG0bcZrBpswbvGST+Un3TZoyTYUfygEkSQDQP1O65CWY3RSkfSYTgZsfAZM9M2dDkDflNnB8UDsSwScLCS3QBS7u3S8akB6SvawlrcV2MjXUD9gE/yceHl2pzIzw6uSfiMQwnmoLq04g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FifR01gj; 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="FifR01gj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3564C433F1; Mon, 1 Apr 2024 15:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711987136; bh=x0RYt7Vt5dtLE5MWqDVc3zJg7P5hSdoaiOxA6nh2t3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FifR01gjYQpN9jDnhlUF5d4wc1R8lOZQOcryrVitTUR7dGGeEaBLKicDP7FmiRVKI AbeF/MWdgb21jB6/2gPM74zm46LQ+HU3FSN6UvyYQCYAJy+E78XQM2z2xPSIepQ+2x IcURgriXOesz9FA8/D0PylflJES17C+LE6VSJAbQ= 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 6.8 167/399] drm/exynos: do not return negative values from .get_modes() Date: Mon, 1 Apr 2024 17:42:13 +0200 Message-ID: <20240401152554.164521870@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240401152549.131030308@linuxfoundation.org> References: <20240401152549.131030308@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 6.8-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 00382f28748ac..f5bbba9ad2252 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -316,14 +316,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 43bed6cbaaea0..b1d02dec3774d 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -887,11 +887,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 = !connector->display_info.is_hdmi; DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n", -- 2.43.0