Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2127902lqo; Mon, 13 May 2024 08:33:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMgdDZ3MAObe8xk260ECCPwKaPmL0uRoreg+E/RRmeAZn/bRIBT/jinKRjFsAwOTuFSLyJdqxxzkI8Ya9P87IsWAp/vOZiHBV7+I06Yw== X-Google-Smtp-Source: AGHT+IGY5gI+fM7JmnBeXfS9jnsUWoS+9UZoboKDfoGDTgOoye9hz2EIBfrjnrHIiTYdt71wOhj9 X-Received: by 2002:a05:6830:1e3c:b0:6f0:e470:1915 with SMTP id 46e09a7af769-6f0e92a4bdemr11005245a34.24.1715614406321; Mon, 13 May 2024 08:33:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715614406; cv=pass; d=google.com; s=arc-20160816; b=j0VrGcy2aRZLsxcOYB9zH3tscNmFvjlcfVVMmcrzaCDCg4HzncQJLmqw97Iz8/vz30 X/W8e6XHWu+pMiONFWsdzjLqDIqQcQLzU1XZVNxCUNJTGGk5xuQugsVpMVK+YQ8wS9Lj C2pc1b0VIOKMlH2pzmioCYoMtqqKD/JuXqVbwW9cXlU/W5ge0+fIPLZ1OyamL57Tcgq0 gmIlMWv2P87NS1LS7PNLlryMYqPBV2zUKfRPS1NFQwu3zZlLYkn7Heq+trUpodft9Z3Y OSbziaTXB4FQ8kDFkY2AotUmqQGRxGtHnS6VM4ABFT7oJLD90MrhL7chEuhpCRtENlsR S+8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4YoVt4aSJSp709BZ9Sg0TFkDLrzgxtQT0KSEfyb8RGE=; fh=YtI1unxrdsy37CaPN2XWjLZc9EMsMnSRizG41qMMsuU=; b=b2kyP4Zpn14XCjVuL76eYrIznaKqwMizRYLL+7AomrrxiqnrOYn2+EcSJpvZvxtqSN aTiPBLZJekddxGPtBGUh7Xl8E9Doby9dTI5+1RCxLgMaTdyHHqFsDy0BRN4Vn0XUMJSJ dzjvAIJ48vMjSWo/99YyWTWDSNyua8koJwvGQbsZ+jbKrYLRP4UPDFBjblcWJ/Hmme7m n6FW0RrJn2g/7uQgOtzKdjasC5ao5n8tTrdU0MjTzR1e5bI1XsZ62K3MqmAWhK5PfjZc v4AMNinL1s3f5S+l6n1zfwVBsxiFBX0KigoxJl/DKBjfX7Lnb32OWLKwR9BormlD+As7 +lew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dQutNbbD; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-177748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177748-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ada2fe7eead31-4806cc90b23si1794659137.589.2024.05.13.08.33.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 08:33:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dQutNbbD; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-177748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177748-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0C4D01C23120 for ; Mon, 13 May 2024 15:32:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E49F154443; Mon, 13 May 2024 15:31:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="dQutNbbD" Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [95.215.58.184]) (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 0DB7C154431 for ; Mon, 13 May 2024 15:31:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715614289; cv=none; b=bkAaZC8XWlBcjJsChXIIPt0pipWNxN0FuRPEkCVzOi1wML9nGKKFJUpCC/JQdSw6cO+apoQpKt3ro5aSX2mGEeUEmwl6qJy/acQQoCLKlHHKkTwY35M5dWAZu9txdiaNTnZIedGXwKAhAlpNdjg6WepF0WkmRC3w6iAxzfOFZZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715614289; c=relaxed/simple; bh=p6YXlAq5y5nroCD3axdcAiCsFuwA/e7PiPvtBxv/PWY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gwWBN+ahN1c3AEPkRtJM8STyCvzalCWVSYCkSYAl4kVg2duzIjtB22CqI/eRvMhD74+Bdu+KHxoD5gUqw9QNNUmk0BVwVXbFOXqaE7+qf912pp2Tt8eCEnlqPfP9KbF1TJXQduvGw/oBVFYaNdhFWEbXwyzERJMnsHtjv+yAyjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=dQutNbbD; arc=none smtp.client-ip=95.215.58.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715614286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4YoVt4aSJSp709BZ9Sg0TFkDLrzgxtQT0KSEfyb8RGE=; b=dQutNbbD0iwsWvTR7cYsV4k51jyQEB518S7NGrJrei0GmE8x2FDXw9Xwpe1viUxWJLfktb cCnzN5N60RHj7cODV2AHrqo2rePzXacLapXoqJhWrN/8iF80pRtK88QX2onB0zWBepOLLI 6P4szXukzBRqgTPN67witSUwmvjaWKU= From: Sui Jingfeng To: Laurent Pinchart Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Sascha Hauer , Douglas Anderson , Maxime Ripard , Thomas Zimmermann , Liu Ying , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Sui Jingfeng , Laurent Pinchart Subject: [PATCH v2 02/12] drm/bridge: tfp410: Remove a redundant check on existence of bridge->encoder Date: Mon, 13 May 2024 23:30:59 +0800 Message-ID: <20240513153109.46786-3-sui.jingfeng@linux.dev> In-Reply-To: <20240513153109.46786-1-sui.jingfeng@linux.dev> References: <20240513153109.46786-1-sui.jingfeng@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Because the existence of bridge->encoder has already been checked before the simple_bridge_attach() function get called, And drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when the tfp410_attach() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/ti-tfp410.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c index c7bef5c23927..b1b1e4d5a24a 100644 --- a/drivers/gpu/drm/bridge/ti-tfp410.c +++ b/drivers/gpu/drm/bridge/ti-tfp410.c @@ -133,11 +133,6 @@ static int tfp410_attach(struct drm_bridge *bridge, if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) return 0; - if (!bridge->encoder) { - dev_err(dvi->dev, "Missing encoder\n"); - return -ENODEV; - } - if (dvi->next_bridge->ops & DRM_BRIDGE_OP_DETECT) dvi->connector.polled = DRM_CONNECTOR_POLL_HPD; else -- 2.43.0