[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1650509728-28138-1-git-send-email-baihaowen@meizu.com>
Date: Thu, 21 Apr 2022 10:55:28 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: Andrew Lunn <andrew@...n.ch>,
Gregory Clement <gregory.clement@...tlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Russell King <linux@...linux.org.uk>
CC: Haowen Bai <baihaowen@...zu.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] ARM: mvebu: Remove useless null check before call of_node_put()
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 <baihaowen@...zu.com>
---
arch/arm/mach-mvebu/pm-board.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-mvebu/pm-board.c b/arch/arm/mach-mvebu/pm-board.c
index 070552511699..8d7385473626 100644
--- a/arch/arm/mach-mvebu/pm-board.c
+++ b/arch/arm/mach-mvebu/pm-board.c
@@ -126,8 +126,7 @@ static int __init mvebu_armada_pm_init(void)
goto out;
}
- if (gpio_ctrl_np)
- of_node_put(gpio_ctrl_np);
+ of_node_put(gpio_ctrl_np);
gpio_ctrl_np = args.np;
pic_raw_gpios[i] = args.args[0];
}
--
2.7.4
Powered by blists - more mailing lists