From patchwork Fri Jan 15 11:02:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 363546 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp184611jap; Fri, 15 Jan 2021 03:04:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9r63LXuQuD/OK5LhqgWwh0+W4TxqbOnoZ6QmJTh5Tc8Li8/r6/q0D1sWitIC8y7fOe7QR X-Received: by 2002:a17:906:b51:: with SMTP id v17mr8656309ejg.8.1610708669612; Fri, 15 Jan 2021 03:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610708669; cv=none; d=google.com; s=arc-20160816; b=If/aCdiVJyf5iEcAEBJDgJ8svyHeYGg46J6nCfyjsGT56m+79EYf3i1f+CceY/EpQs RRRkZv4Y0ESVuiFB/Pb81PVrIcz+9mvbQ8URicFN2jP5IzemMCafoFRYbec3Wfr8LTca HT5AzU4WVRATVIk449t7pt8TWMSiNZCWiF/XdFZo9z32GLuPQeiOm25PF3cROPVk456Y isWf3SDRoxsV1JIsXqgCrg2DRPpK73uZGDFNuAe7zpCLf40SbfWkBDbRLQtX87ITLN/6 pe39VhFNFVhUgSN3HKlMjJqsdOuNVzzJgMz3T0O57DhYW/6Gh7U38oOFGN48NpDl7+yd CClw== 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=DqFR45U1N2XP3NccldXpdPJeTXVL3bDa06J/rceWY/RBvt+w+Qe/5LFIXKnj0fuE8d DOc13GDKMtr1F8IpR2pxwiRjRirix4nm1vdM72CrTVU/k6yTeGh9fJ7ODcXGKsj0AAgy IJRMkBwWA9/khzQgou1RmdKrdQKuOTYRdIXQYQ9GaeqRLwOcTdJcw8PVn5Sx8bNeKERA F2eK13pp0jP7AlML1QhYcOYDG5m3lEAUF+O290zDuBHr0jdMNu5obKn+vsrqwy3AjFyv MROzI1co4XjI8SxjJYW6KahUs5dC0Kzj/daPdV6hsJgE3GDyvo4l5lVpAqs4uOSLwvLY P3aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yuOMDW/x"; 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 m10si3877144eda.139.2021.01.15.03.04.29; Fri, 15 Jan 2021 03:04:29 -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="yuOMDW/x"; 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 S1726642AbhAOLDP (ORCPT + 15 others); Fri, 15 Jan 2021 06:03:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbhAOLDO (ORCPT ); Fri, 15 Jan 2021 06:03:14 -0500 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F143C0613D3 for ; Fri, 15 Jan 2021 03:02:34 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id u11so9881930ljo.13 for ; Fri, 15 Jan 2021 03:02:34 -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=yuOMDW/xAGqHviE9dKa3cO0BxBs30bU+Rvi6uWs/FKsGR73rumUZJIrpMtMd8tSDPE 0rdj4CvQX1eDZwxa1JZNXNTmQrg/5tRO4SLMcHN23O6AxrPw2sAmUC+i2aWdPnN/mfQK 7J6d0eMw7bp/RxH4iRVx/ROHx6xT1mJlgDpcLUYa2qaQyOBkpFu5s86+/EMVccDpio7F GTAOxJAMQ0x0H8JF4OLjZLSdPRuli+YB3y+XZLjMGQ7M9/ZEsoz/dh/X0VGx0raB8+bt FRDFgyFILUJkgfBTz/gIJMCX4q6wqYS+kkZ6JXfVVddzvAHLa0aDNg0gOdEbqoM1CbfD nM1g== 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=p967lCSeBoqrGkc7xrKUpGh9gJBXPsGjPqxlROEJAZ0l7QI+AtpkN8Mgvd3amQJbkQ ullocD38fK/0nc0XW+U5mXYsG2pxVZfBkpHidmu4nR2n0w5+1Yu/pz7R5U0z0JpdtKNS yOAJO82EI723sE1Nuji8lRptsCBKw5M2a5L5lfDGlwfl4XnmxmC3OJLcVcGCVbwiP9pu az6qYeudGu8Fv7nh3rv4siBlxiCxf1cgHQ1isACkyzDdi+XbZ1CbP47sAlUIwjDSxd1I Vg7vBuDk57Xfpcs/dsYHWSUaEHu4Q9X1lpvAI0qr8z41xJucw2BiZsRK4YGLW32XDd2Z qSzw== X-Gm-Message-State: AOAM533yDlE/p8zeBpcyY0E5Ss5AsizQfm/CeWxKeOFtH9oQ/Q55ZKsd 409KlW1aWVQnXKDwlLWpDLuNLA== X-Received: by 2002:a2e:8ec7:: with SMTP id e7mr5053355ljl.249.1610708552728; Fri, 15 Jan 2021 03:02:32 -0800 (PST) Received: from eriador.lumag.spb.ru ([188.162.64.106]) by smtp.gmail.com with ESMTPSA id s8sm862020lfi.21.2021.01.15.03.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 03:02:32 -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 v2 2/3] drm/bridge/lontium-lt9611uxc: fix get_edid return code Date: Fri, 15 Jan 2021 14:02:24 +0300 Message-Id: <20210115110225.127075-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210115110225.127075-1-dmitry.baryshkov@linaro.org> References: <20210115110225.127075-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 Reviewed-by: Bjorn Andersson 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);