From patchwork Fri Sep 20 17:29:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11154835 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BD9315E6 for ; Fri, 20 Sep 2019 20:40:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5FAB920B7C for ; Fri, 20 Sep 2019 20:40:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FAB920B7C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E52B66FDD4; Fri, 20 Sep 2019 20:39:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id D39A46FD76 for ; Fri, 20 Sep 2019 17:29:28 +0000 (UTC) From: megous@megous.com To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: Remove redundant of_device_is_available check Date: Fri, 20 Sep 2019 19:29:14 +0200 Message-Id: <20190920172914.4015180-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 20 Sep 2019 20:39:51 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1569000566; bh=yFh3SHDAWhDFWZ5U5l/Fjokt0AcfkOIyuWq4AwQu/1I=; h=From:To:Cc:Subject:Date:From; b=BurnvNZgHpqgi/eynnP37W8qjm5smxV9mFxNb/P2HCRa1yCfRpDl/aVWnCjBqF1xT 7VrjpaRFq8lr99bIywaCbc875zzJoqbP65yjBYuwuKPx/BQYfhLNzvY05CbKN8U96U ykzSiij1086wXyyLCickKTAEqPUclG7xSWCH74Do= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , David Airlie , open list , Maxime Ripard , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Ondrej Jirman This check is already performed by of_graph_get_remote_node. No need to repeat it immediately after the call. Signed-off-by: Ondrej Jirman --- drivers/gpu/drm/drm_of.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 43d89dd59c6b..0ca58803ba46 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -247,17 +247,12 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, *panel = NULL; remote = of_graph_get_remote_node(np, port, endpoint); if (!remote) return -ENODEV; - if (!of_device_is_available(remote)) { - of_node_put(remote); - return -ENODEV; - } - if (panel) { *panel = of_drm_find_panel(remote); if (!IS_ERR(*panel)) ret = 0; else *panel = NULL;