hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/soc/qcom/smem_state.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2015, Sony Mobile Communications Inc.
34 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 and
7
- * only version 2 as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146 #include <linux/device.h>
157 #include <linux/list.h>
....@@ -144,6 +136,7 @@
144136 struct qcom_smem_state *state = container_of(ref, struct qcom_smem_state, refcount);
145137
146138 list_del(&state->list);
139
+ of_node_put(state->of_node);
147140 kfree(state);
148141 }
149142
....@@ -177,7 +170,7 @@
177170
178171 kref_init(&state->refcount);
179172
180
- state->of_node = of_node;
173
+ state->of_node = of_node_get(of_node);
181174 state->ops = *ops;
182175 state->priv = priv;
183176