Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp761889pxb; Fri, 22 Apr 2022 10:35:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWQj3R76swmSkY7jUObDPqY6lBZRP6EIbAGiO7c1s2bRRkowiUp3btXCBCnBaEapQpbxZe X-Received: by 2002:a9d:1ec:0:b0:5ff:a72c:99b1 with SMTP id e99-20020a9d01ec000000b005ffa72c99b1mr2185458ote.31.1650648940292; Fri, 22 Apr 2022 10:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650648940; cv=none; d=google.com; s=arc-20160816; b=Ytk1XyQg2PIM+OhiR/V2mv6F8D3q9O2JGH719tC8Go0rO+6ac+9ZjGOyzBvlexGaJE F9ar+CZum/04ico4OCafnwox/GvfjJYqmHt1vA+/nVHe8qqDErF7MEWei77fIYEouqzZ Va7Y7qkto6hw6FC8r6iO/FYfEaE9wxfDkvyEuyqXkY3uJf+rCPPh+2Q9gLnhnqyV005i ldh5wVUYbXND8XhE3MMWh9TZ3I7g+sCBb729ApkWg3ua4hVjsmDztOSeNTTdfiA2BAQy 0T2n7B74IiqEYsDvfslTA7tLPiOPdG4HBw8DK2WzEcTsOKB8BL52wHvLQsgnZcS/jD3r Upsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=UH9k/EkOyE2HSTgBUeIJLoxGpdv2dS0un3rki5ucAq4=; b=osMDUhNM6soyAriPadXhPoO4phvJyJ2vnw4GRnd/53REtm55WX7+qVbmbZfKl/GNF8 7xDbpdXczAK466eIK0scR2yJwnHNSw/ulPKe7u8CJPAIr/CwIicHm3bxsEuMN3+bxVQV rk7w+ePsLbGvX62jT5+E4Sc2Ay9hQh6ewyG/ZNEtYt/tlnkxrHREqVe3iCLnYcjVAaMS Xrdn5OxiU/AAdcNW9ApaRWBoUpjiR1h/jVgJZCO8FWlxXV0wn/Mcz+m0kmajPbAh8A/T tI7DjLRKr0t3jTDq8S/ZW278l4m/VeyueWBrzO+BBbB7UclN8fhJhxK+qaywMSZ6N3y8 U5Uw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v16-20020a056830141000b00603be7cd3e1si4656421otp.97.2022.04.22.10.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:35:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 05C02D556C; Fri, 22 Apr 2022 10:26:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383832AbiDUCzC (ORCPT + 99 others); Wed, 20 Apr 2022 22:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiDUCzB (ORCPT ); Wed, 20 Apr 2022 22:55:01 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFB93DF1B for ; Wed, 20 Apr 2022 19:52:12 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 21 Apr 2022 10:52:12 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Thu, 21 Apr 2022 10:52:10 +0800 From: Haowen Bai To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras CC: Haowen Bai , , Subject: [PATCH] powerpc/pci: Remove useless null check before call of_node_put() Date: Thu, 21 Apr 2022 10:52:08 +0800 Message-ID: <1650509529-27525-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No need to add null check before call of_node_put(), since the implementation of of_node_put() has done it. Signed-off-by: Haowen Bai --- arch/powerpc/kernel/pci_dn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index 61571ae23953..ba3bbc9bec2d 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c @@ -357,8 +357,8 @@ void pci_remove_device_node_info(struct device_node *dn) /* Drop the parent pci_dn's ref to our backing dt node */ parent = of_get_parent(dn); - if (parent) - of_node_put(parent); + + of_node_put(parent); /* * At this point we *might* still have a pci_dev that was -- 2.7.4