Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1112636lqo; Sat, 11 May 2024 07:56:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW18p8J3ugCMjs9LobaVWZ5U8aUb54ufP3oXnudFMrM2u4YjzrYe4zwSC/9++EUhMXvQMtxry00ev7jjnS4aQ88Xz1uF15KtG7E/S1Uaw== X-Google-Smtp-Source: AGHT+IG0bgPJVrHQZftOI+vGC1vlkfmjOMP1lWbVnygQcBCDXLkmvAqNdy3Y4wEzowxKEvQQpRkm X-Received: by 2002:a17:906:31c9:b0:a59:efd0:e884 with SMTP id a640c23a62f3a-a5a2d57a38dmr344056966b.27.1715439382507; Sat, 11 May 2024 07:56:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715439382; cv=pass; d=google.com; s=arc-20160816; b=kq/RZLaF1Rn89rTDnhjauU++FBpne47s+NxD/c2ipACOkDFIYyK1M1rQGel3CsM9pX KlHKEUHCuQWPJ136j1e+GHFEHbaFJr36e0/jnOH8WgK3LZRUh6qDLRODQy6hXktFnzze qSqdSmL9vpSr7PRMf4yM/bBWjiN8d/3ZdcVbueBswBsGEURx8BXfXGe3ytnMiMqgYrAs W1dpd0xZDwFE74/Dcea4vU0tN9iKK6pNbEBuIYHCOnb582B60yynNJgmZ1pqg3Nf7LCs whiJuVB5FtCzACULKVjTcs4JxbT/M5lvkNBrmhj6Yp509fF+70jLyYVGhEdPP92/d0eQ 40Cw== 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=fLoNj1TdFzof77QtMBY2FlaBpFNEQWVn75IC8HxaP3o=; fh=wOxYnf5cB8EXtrDPB+7Ap+AE3ORvvjAbNrmA+4qPZLg=; b=cm8vNJozlWwIZIyUGziq/EODimNbU7mzFicS+ILo6gISWd7aYTsC5As6pneXLTqv9G 7sRZvVqeS+HtpmJ/K3vaJ7RJNGdjMYBe7aFPJ5/s2u0WDrYi32HCPgjqO/ga7Zit5ZIC Yid+Yunrx8sroeQhVwWgUTceZl3wFVsy0tH0dkUDnme3Do3+6wCd9y4f5qvJ6Wjpg7TV 7LYKS+8UbXrMtweKuBfHSSvv3Q6pHJx850eLfGQz8Hcs4taRluUEAL3P//r0d88bTdjJ Q8ij658tXQxqWLls/FG3a8EQUxx1EpCU5RyPz9RfeHfNVNwVbV7vgQsTPJmDpmwQ15/J BHng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=F04Q+4K1; 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-176591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b4c54dsi322167766b.452.2024.05.11.07.56.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 07:56:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=F04Q+4K1; 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-176591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176591-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3E5FF1F21897 for ; Sat, 11 May 2024 14:56:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8880F56B73; Sat, 11 May 2024 14:56:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="F04Q+4K1" Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (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 8BACD56773 for ; Sat, 11 May 2024 14:56:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715439362; cv=none; b=DmXE62HLgXptoQFk1Vqxmmu/yL3oZA6Xy3a/LLvWsfboni5mwraea2eWQeQDonnmTC70LeX8QFq76/NTcEvpUBZF9Xb38rDHjxWK7hFbPl01Drm54ISsvuCKxN5/ojNY4zaMVf21yCegVj79LlyVB9Wc9BJbSkqbEuOcD6g8n2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715439362; c=relaxed/simple; bh=SVQMqa2r/6vMx/PrKmXTy9Z/bnq/aQVKbgm1YzdvXUs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IA4P+QsIrjqfsom6SdN++W3J3fde1ln7TsRbcCO0r7Bcvdct1HJnxIjOLuAiuw8Hv5pnSMBLOYNdwlmsOTENmvfEwTR+yhWUgJC45BxVV06ItOtZKPOUQphlLe/6pOARFI94M5onBcXT0xdq5kJsW4CWBvD8kLKiiCqQ/4yvKP4= 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=F04Q+4K1; arc=none smtp.client-ip=95.215.58.188 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=1715439358; 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=fLoNj1TdFzof77QtMBY2FlaBpFNEQWVn75IC8HxaP3o=; b=F04Q+4K1f8y3k4yMDVAKeGMfPgpAZNodhB7eRwQ9ieT+62zs0QcKeUakgZSvGCjKHry1l5 +fNjggxspxAtog+lUihviY8Zek920ATjlGIqwpZ3LtlL4UoNhoN5ufEGS1D2E6r2qRFwBE WypcdHnmW+h7CwPlmhutGgX9aV94UI8= 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: lt9611uxc: Remove a redundant check on existence of bridge->encoder Date: Sat, 11 May 2024 22:55:49 +0800 Message-ID: <20240511145549.325852-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 lt9611uxc_connector_init() function, the check on the existence of bridge->encoder is not necessary, as it has already been done in the drm_bridge_attach() function. And the check on the drm bridge core happens before check in the implementation. Hence, it is guaranteed that the .encoder member of the struct drm_bridge is not NULL when lt9611uxc_connector_init() function gets called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c index f4f593ad8f79..f1fccfe6c534 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -339,11 +339,6 @@ static int lt9611uxc_connector_init(struct drm_bridge *bridge, struct lt9611uxc { int ret; - if (!bridge->encoder) { - DRM_ERROR("Parent encoder object not found"); - return -ENODEV; - } - lt9611uxc->connector.polled = DRM_CONNECTOR_POLL_HPD; drm_connector_helper_add(<9611uxc->connector, -- 2.43.0