Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1073290lqo; Sat, 11 May 2024 06:24:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXrM9STpKiE78+vtNA+XjIqg7b3kRAPlR3q+gPADOKhUUGA4dCzBfIHakI2x6GiViJoLGFQVOBVR5UzKsZDSiZCILHpTeQlkBPmQ1w4Lw== X-Google-Smtp-Source: AGHT+IFM2hsBW/dQBxLjPYj5UzfiCsbgzuveEgrtQQu4nMCO8HRTfoGYtIEN6LgmeBlY/U+L78C2 X-Received: by 2002:a9d:6f91:0:b0:6f0:4201:973a with SMTP id 46e09a7af769-6f0e9129421mr5320590a34.13.1715433885158; Sat, 11 May 2024 06:24:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715433885; cv=pass; d=google.com; s=arc-20160816; b=y2NkuNhNu6XXhu4Y6xQVjzWDzJJuJa2jgvDLon6B5SetyYKoC6oenSvZ5WIAzUChAf HGFIrG6VZAh/aTdR2KzoBOi9YFBRenbfZk+ITUCjU9gc3aLOe18SEkVoDysTsPSQXHXX e1x1gRAsW/6CoKwcRONDnMWpBsZ+KYb7184++HCxIX7sd4Kdc/nOu3zK7mdK8kcDIy2B kvt8bpo5vkMQREcdw0AwtVomx9seOD7gUfjzBehSGFxmfj/d6ZQln2jlI1NnDCxm6e9c bSPiypBX3h49w/3eCuorKKGXGnJvG9wJqk8/SJ1JWgemr6YGRxHwhp/CZrWWBd5uyMIL 2UBQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=G4aWH9heM5QxNrIphohY5XxHxE4Iln3Lp/nTshXAL3g=; fh=wOxYnf5cB8EXtrDPB+7Ap+AE3ORvvjAbNrmA+4qPZLg=; b=OOK21tGVMjiLbSLIx7E9kNwTiOFtJWQd5ZuIAKXwuJUeeg1o4NCsw4fuI3jAm26lsQ GiAFG189ek55I0iKiOte3MYfHue/mnNB3SPsEOAlXRB0i5tcALgUXxNlG6UnChuFEVz+ PeHZCTbA3scIaCR2htTBTPRQEBvqgD9dkP9EX//yRHah+Me49NAl1DKWtMuICA3vkmFV //ohfFAK/dVjoAsCHorzeVqMsFopFQrJolGYy5vs/bxC25caj4eeYs+OoBhGihFE2uCi ihdo85xXPc0uaWemuEg7a6boO1Ucv8Q0Se4VpbIGKhoVddu7zoB67whlx9CEupWdYqFG 9vug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="oTadM/iX"; 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-176558-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176558-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. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf38edcesi330831085a.749.2024.05.11.06.24.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 06:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176558-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="oTadM/iX"; 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-176558-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176558-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 B7C751C20BF6 for ; Sat, 11 May 2024 13:24:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B39CE51C3B; Sat, 11 May 2024 13:24:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oTadM/iX" Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (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 C0ED15024E for ; Sat, 11 May 2024 13:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715433881; cv=none; b=NtiUVfds6X3hGsLC7nAJPVCPg32Gw3afkmd9OnH3roFkXHpoLpifRHfiDnPJnYn452nVZgd9Th+9KIKn0yduib3IIS+X0tIDwLQNU51ypv9GiTP0ov2Md2SZrWkqZgaDfu+pYqN9+cOtDca2U5Oo9vnIeJGOZ1n201CLwVj5zdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715433881; c=relaxed/simple; bh=fYQ+E4OSc4wxVYuh2mIdAJlqCAIdlE+Q+PVPR7UX4gU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uWjEufigyK1I6ERSmO5iNiwlKnK6OHG+yIo6lweX6rqzmxeQY0XQJVVzzt5Ba9omsy2Id8dNdkU1oifz7lRknwaXx5M6iSyGtP8iv2b2Xoc5ypy+iaGrv4+662DYmEuVrS/tTVFN/TapbLhypzubJz/GI3jfqbiQ3nIXKVa5sfA= 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=oTadM/iX; arc=none smtp.client-ip=95.215.58.172 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=1715433876; 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; bh=G4aWH9heM5QxNrIphohY5XxHxE4Iln3Lp/nTshXAL3g=; b=oTadM/iXv2RMQypdOnk4bRZ/QzgmhcMv2hkt6sVbOm0/z9X9RxFe5ab89CH4ZW3hB3xtDf w6s1E861sO0dGRllNsduL5q+nNgOh5nGMT+5UJrLHYFIRsTMNmfY27wXzZ/1dw+HTrz8Gf BIdGiYZMkxxDeutp+jhc0ptInXiRDeU= From: Sui Jingfeng To: Maxime Ripard Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sui Jingfeng Subject: [PATCH] drm/bridge: tfp410: Remove a small useless code snippet Date: Sat, 11 May 2024 21:24:23 +0800 Message-ID: <20240511132423.311884-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 In the tfp410_attach(), the check on the existence of bridge->encoder has already been done in the implementation of drm_bridge_attach() function. The driver won't go further if bridge->encoder is NULL and the driver will quit even if drm_bridge_attach() fails for some reasons. Therefore there is no need to check another time at the later, remove the redundant checking codes "if (!bridge->encoder) { ... }". 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