[PATCH] ARM: mvebu: Remove useless null check before call of_node_put()
Haowen Bai
baihaowen at meizu.com
Wed Apr 20 19:55:28 PDT 2022
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 at meizu.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
More information about the linux-arm-kernel
mailing list