mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: oss-tools@pengutronix.de
Subject: [OSS-Tools] [PATCH dt-utils 3/6] state: drop null pointer checks around of_delete_node
Date: Tue, 27 Feb 2024 15:26:08 +0100	[thread overview]
Message-ID: <20240227142611.2421711-4-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20240227142611.2421711-1-m.felsch@pengutronix.de>

This is a partial port of:

| commit 035ca2a10ef2b5776629eadb6ea97b22b7978ccb
| Author: Ahmad Fatoum <a.fatoum@pengutronix.de>
| 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 <a.fatoum@pengutronix.de>
|     Link: https://lore.barebox.org/20230519100120.2365970-3-a.fatoum@pengutronix.de
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 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




  parent reply	other threads:[~2024-02-27 14:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 14:26 [OSS-Tools] [PATCH dt-utils 0/6] barebox-state sync Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 1/6] state: align state_backend_bucket_direct_create with barebox Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 2/6] state: don't mix goto labels and statements on same line Marco Felsch
2024-02-27 14:26 ` Marco Felsch [this message]
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 4/6] treewide: rename struct device_d to device Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 5/6] state: make uninitialized state less verbose Marco Felsch
2024-02-27 14:26 ` [OSS-Tools] [PATCH dt-utils 6/6] state: backend_bucket_direct: add debug prints on read/write Marco Felsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240227142611.2421711-4-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=oss-tools@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox