From patchwork Thu Jan 21 23:33:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 367883 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1001384jam; Thu, 21 Jan 2021 15:34:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUVR/0zvLPJJJBs2BuaCvcRe8s4HDnOtnb8JkfQWBCoBhGUS3fBWpg/aB50nQCZ5PfU/ve X-Received: by 2002:a50:d604:: with SMTP id x4mr1197041edi.64.1611272093134; Thu, 21 Jan 2021 15:34:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611272093; cv=none; d=google.com; s=arc-20160816; b=iEu2TkTYLix70j6gfZXE5Va4rtxYs3ylVUcgYcEe684IZd+ScDQJ6W/md+SIKELYlb 89Rs8z9QqXEgN8PfoI/F5YyYmaSKEXtgTC3bld3zDUR9AHDrCCIBQXyZogkv+oLDqlFI 9yXjSo8VNlRK6+2bSVIwZOnApPbLiNIcMOB5tP/SNSlgDNYgNjDVvKnt6OEYPDRaFnDr LWto0BxAuL7gSpf3F8W4Q8tcjdk0HyY0bqZcZUPa3Tnh7WqYAAfcxQuqy261lB2lIEwb GqlDvd25FN9b3DBXeaJbXZZWnoMmOGKvnEcg0oPCf6MjUh2mK01QqMT4vvu2H5U/LJAz MQtw== 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=LXLBko8Cp1/+g8qjMNN3MI6diNB1wKaGBp6QZagrUvw=; b=UPGBwTccfd82LbbwT9zfW2aDBveKuqxJCO6/vrn5NFrV64WetXb/4g91PIT8Nb/z5k XGSGq3MSfijuRZv8xKOWVi4TvvBZytvNVORzIC85vfj1r4ZmYjKoLj3h52flR6CrAClE Xbhe7kKlc9S79uUp9wDRcj/P9xrhm9dlaKWWRTXRQjoarx0EN67h8Ehey73zUGswg5aF hf+Hz6ZWq2uaNvPBT2ZLMSB47bs1vHsy2BvN2FZYSa/zaAujCNBUXUe+GZfc2eh7a4AV IurYcIYHJJ0nH/bzrEPZZEyvMOFPWSQl3qmwjN6JvmfZrg4nXQRsMuwceGY8wCICJapl lwMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H6plmw40; 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 go33si2315156ejc.40.2021.01.21.15.34.52; Thu, 21 Jan 2021 15:34:53 -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=H6plmw40; 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 S1725956AbhAUXeP (ORCPT + 15 others); Thu, 21 Jan 2021 18:34:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbhAUXdz (ORCPT ); Thu, 21 Jan 2021 18:33:55 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07592C0613ED for ; Thu, 21 Jan 2021 15:33:12 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id b26so5006470lff.9 for ; Thu, 21 Jan 2021 15:33:11 -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=LXLBko8Cp1/+g8qjMNN3MI6diNB1wKaGBp6QZagrUvw=; b=H6plmw40MZ+6SjPcYq1mPJlnbzickRzJ8SRP54NDX47VY7L8rNmE3rpyVZsiOtXeKi z8mVBmZKjk3FRQqTig0hlWgLXB+S4m9KwqcsBQFHlecYLl/fzpMOt5hd5+uJCkGUzN28 NJjT2CRKFPXHy7KeJxw1z6m9Bw6kaUnSevl/j80O2LY78QPrVz4KmfcX0ITxZ9753THh UoY5p4VENRuytKHWiXDJE5+73P7l5GR+DwttXHxCxQW1dc4oqsKs0dZ0bb/ElL/NoHFT LaCKSPE2HphOcd00RiIwmP4YelSr5zNzSB16Ar7VilBQSBw+640Mchk4kTsD9qNSYdTn 3lkw== 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=LXLBko8Cp1/+g8qjMNN3MI6diNB1wKaGBp6QZagrUvw=; b=ucc5W0X0AwDlseS8fhEQ1HSjztinLOByOMXrgueoOFa5ZxSXGZYU9CYlA2471Y4GZI ZTzLKGcUEUdpp1KXyhK07tSmB4tn056kOnvtkOt4oedLC0f/uds5wfx2Ze3LhtB2QzF9 iA2KZDexxrjwUaunIgcvZGfRfGSzhkVY4GqTSfsKKc5di2uiIJZi4VpGwkpbr1UUwH08 Tt3bksdfXoq25C8mFB50Il1EhCEdXcg7JuJWpWshzrPsNAdS+kJmqQWpZPZLi7GtimSx UzHPME4cRpJldX1HLjxoa4+sbhIGqAAo6dJAcXhZTMPYHJcfVyUbRjky5soZA46q0smp DhOw== X-Gm-Message-State: AOAM533Av0362RlLDziAxovIY92dyXhjPVEWmzRFORkK7lrV1teB3EyQ tpsykLh2cbTS9i/nkuNYGpjPuw== X-Received: by 2002:a05:6512:612:: with SMTP id b18mr864962lfe.598.1611271990559; Thu, 21 Jan 2021 15:33:10 -0800 (PST) Received: from eriador.lan ([188.162.64.145]) by smtp.gmail.com with ESMTPSA id l28sm726969ljb.42.2021.01.21.15.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 15:33:09 -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 , Bjorn Andersson Subject: [PATCH v4 2/3] drm/bridge/lontium-lt9611uxc: fix get_edid return code Date: Fri, 22 Jan 2021 02:33:02 +0300 Message-Id: <20210121233303.1221784-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210121233303.1221784-1-dmitry.baryshkov@linaro.org> References: <20210121233303.1221784-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") Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.29.2 Reviewed-by: Andrzej Hajda 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);