hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/mach-hisi/platsmp.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2013 Linaro Ltd.
34 * Copyright (c) 2013 Hisilicon Limited.
45 * Based on arch/arm/mach-vexpress/platsmp.c, Copyright (C) 2002 ARM Ltd.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
96 */
107 #include <linux/smp.h>
118 #include <linux/io.h>
....@@ -70,14 +67,17 @@
7067 }
7168 ctrl_base = of_iomap(np, 0);
7269 if (!ctrl_base) {
70
+ of_node_put(np);
7371 pr_err("failed to map address\n");
7472 return;
7573 }
7674 if (of_property_read_u32(np, "smp-offset", &offset) < 0) {
75
+ of_node_put(np);
7776 pr_err("failed to find smp-offset property\n");
7877 return;
7978 }
8079 ctrl_base += offset;
80
+ of_node_put(np);
8181 }
8282 }
8383
....@@ -163,6 +163,7 @@
163163 if (WARN_ON(!node))
164164 return -1;
165165 ctrl_base = of_iomap(node, 0);
166
+ of_node_put(node);
166167
167168 /* set the secondary core boot from DDR */
168169 remap_reg_value = readl_relaxed(ctrl_base + REG_SC_CTRL);