From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 27 Feb 2024 15:26:15 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1reyPP-00AlB2-2T for lore@lore.pengutronix.de; Tue, 27 Feb 2024 15:26:15 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1reyPO-00041X-Fj; Tue, 27 Feb 2024 15:26:14 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1reyPM-00040C-LY for oss-tools@pengutronix.de; Tue, 27 Feb 2024 15:26:12 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1reyPM-003Dbd-7b for oss-tools@pengutronix.de; Tue, 27 Feb 2024 15:26:12 +0100 Received: from mfe by dude02.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1reyPM-00AA25-0Y for oss-tools@pengutronix.de; Tue, 27 Feb 2024 15:26:12 +0100 From: Marco Felsch To: oss-tools@pengutronix.de Date: Tue, 27 Feb 2024 15:26:08 +0100 Message-Id: <20240227142611.2421711-4-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240227142611.2421711-1-m.felsch@pengutronix.de> References: <20240227142611.2421711-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [OSS-Tools] [PATCH dt-utils 3/6] state: drop null pointer checks around of_delete_node X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false This is a partial port of: | commit 035ca2a10ef2b5776629eadb6ea97b22b7978ccb | Author: Ahmad Fatoum | Date: Fri May 19 12:01:16 2023 +0200 | | treewide: drop null pointer checks around of_delete_node | | of_delete_node is a no-op when called on a null pointer, so remove the | useless null checks around it. | | Signed-off-by: Ahmad Fatoum | Link: https://lore.barebox.org/20230519100120.2365970-3-a.fatoum@pengutronix.de | Signed-off-by: Sascha Hauer Signed-off-by: Marco Felsch --- src/barebox-state/state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c index 13d406e6a38b..df76407d4d33 100644 --- a/src/barebox-state/state.c +++ b/src/barebox-state/state.c @@ -561,8 +561,7 @@ static int of_state_fixup(struct device_node *root, void *ctx) goto out; /* delete existing node */ - if (node) - of_delete_node(node); + of_delete_node(node); return 0; -- 2.39.2