From patchwork Sun Jan 17 00:23:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 365234 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp1677649ejb; Sat, 16 Jan 2021 16:26:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMMFdYugjvPA6R6qN3vEqA3qehZTfDnBJrHWViBN0E09wd+bPnVXGoZpcE9bIlY52toEtk X-Received: by 2002:a05:6402:26c9:: with SMTP id x9mr1546747edd.365.1610843161611; Sat, 16 Jan 2021 16:26:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610843161; cv=none; d=google.com; s=arc-20160816; b=bpOKq0CWfli+/nwz9egeMfGoJzVDqZfvt0kyGhjLj8JXc9JRrRp+PqRsbTdDx3r48U L0AcNaREqs4k9Q6atuzFMmRyFqPahTj9H3nYTSSetJiG+H6WCz8qqPR8Z4nOSyyo1Cbn 6n+8jTwyuG020U0gB5NDhPclWXBvisTFd6cdsHXXVbQQ041E0XrXEPKesNG6CtogCm8n Tao5ckUhxZ5wtEJXhJCmEejwFHI9QEgol216lwW7YK2ZremECVQ/TcWFZQbCnlNeU7+9 2wV5e9R/PNtA1NzrVCyLga3F2B31+rUxVjw4hyRLRtUFrbCUi4x8Hcw95btpLaYJnAo0 Dqng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pngCiC8UVrFmDGTkFK9zXDEQWbuDnES5IXJTMMZSYC4=; b=aWfJ/w4oGXJhrLyPL548lQLEt+E9EGaXlioKGbvlW98sysUdQGaQOsuksubVUC98CU Q5gExYRVaVEe9y5J7YfOaJ9Q/R+oTPmms6PCq03ASxb48eriCyebddTI04HJLDFBH08R DfPXobpWl13wKiM3GDHFNLKRua20fwHE6qBIwqCrMlgqe7KPPmB5EvKJzNPW4nRSkWeM 2w6ZYgsT61j6Uv4qUq2ioCNIzw/VPSiU9frCd3yHwn8QNQAmLTlF85vfL9RR1PgLilMN iZCg7v4LVz2xSKcgRuRZSHewFblyQjDkts/yPUJc2QhxeUrNi9FeNSFk0JtDGxSaPHrz 2Wyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y7wUaE5u; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si5562839eji.498.2021.01.16.16.26.00; Sat, 16 Jan 2021 16:26:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y7wUaE5u; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbhAQAYn (ORCPT + 15 others); Sat, 16 Jan 2021 19:24:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726785AbhAQAYl (ORCPT ); Sat, 16 Jan 2021 19:24:41 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E86EC061574 for ; Sat, 16 Jan 2021 16:24:01 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id f11so14453973ljm.8 for ; Sat, 16 Jan 2021 16:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pngCiC8UVrFmDGTkFK9zXDEQWbuDnES5IXJTMMZSYC4=; b=y7wUaE5uSs9/X1CgZ0TgeV+nYHROi8wXtaSQXaSFrr/YXaVn4ZkDx/z/CcIGc4aFhj yfVNJ9hRPzVVlnFeOKfOUWdYMiLz9LzYLYEAKKQ3zrd8q06qsc6M8pW99JyJeoZyuv7Q cjRJu7FsGE6ztp3WsT7fUi5dcaFxEtXEe/hj+l3kUoDAjmBD9G9G0bLlQqmUBSXOEFov wV+0IosGaHEy4YLwDUqbPWIT59zLJV2DNI6I8P7k5nqwjSfydOAgydT5n54AVIRR96sV zvNFcWy7ivZi9VH4WUnwO+emzrfy6nZbdocy20g3qHhDt2XzuG8HkyFQSWUXSDwhG71L rk7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pngCiC8UVrFmDGTkFK9zXDEQWbuDnES5IXJTMMZSYC4=; b=X7570E6Hff/Yf/mR0IMOI7atBBPaut+M755hRYGTA0q4vErmq/LiDSsSpObzIpUt/6 J+A6hp/Td1o4l+DthbPYHft+Ufk2TpZh6BB5f/gJtYcjpMxEAzSgQvQyHMrL9wagQr43 U15vjlc8PzflQrtPablP2OjxDpjcb5Ht/5WiMe2k/ytYh6uaJaIXQDYP8U11+xjPJiOd 675tFZcJ/S0B8xHLtEJO+D8SgRyh3Y6lUI2WlY2kkzUbfLNOHcHzXzIn7IkfTGH05gTV e9DUFAAHia55raeVEOK9MDSL3qgFK5C9N750t5IB5P2vTISL7g6xmGAOUnwGamsAw7o9 HP/A== X-Gm-Message-State: AOAM531xMIVK1k3W5D0sVF6pKOBzl/fcWB7gI/lSPAO5F2z+ONspcoFn lRm+ntuuuXXS19xnfaV2rfhP0Q== X-Received: by 2002:a2e:3c01:: with SMTP id j1mr7969902lja.258.1610843039706; Sat, 16 Jan 2021 16:23:59 -0800 (PST) Received: from eriador.lumag.spb.ru ([94.25.228.101]) by smtp.gmail.com with ESMTPSA id q1sm962468lfu.48.2021.01.16.16.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jan 2021 16:23:59 -0800 (PST) From: Dmitry Baryshkov To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Daniel Vetter , David Airlie , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Vinod Koul , Sam Ravnborg , Manivannan Sadhasivam Subject: [PATCH v3 2/3] drm/bridge/lontium-lt9611uxc: fix get_edid return code Date: Sun, 17 Jan 2021 03:23:54 +0300 Message-Id: <20210117002355.435860-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210117002355.435860-1-dmitry.baryshkov@linaro.org> References: <20210117002355.435860-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Return NULL pointer from get_edid() callback rather than ERR_PTR() pointer, as DRM code does NULL checks rather than IS_ERR(). Also while we are at it, return NULL if getting EDID timed out. Signed-off-by: Dmitry Baryshkov Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.29.2 diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c index a59e811f1705..b708700e182d 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -505,7 +505,10 @@ static struct edid *lt9611uxc_bridge_get_edid(struct drm_bridge *bridge, ret = lt9611uxc_wait_for_edid(lt9611uxc); if (ret < 0) { dev_err(lt9611uxc->dev, "wait for EDID failed: %d\n", ret); - return ERR_PTR(ret); + return NULL; + } else if (ret == 0) { + dev_err(lt9611uxc->dev, "wait for EDID timeout\n"); + return NULL; } return drm_do_get_edid(connector, lt9611uxc_get_edid_block, lt9611uxc);