forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/arch/arm/mach-mxs/mach-mxs.c
....@@ -1,13 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2012 Freescale Semiconductor, Inc.
34 * Copyright 2012 Linaro Ltd.
4
- *
5
- * The code contained herein is licensed under the GNU General Public
6
- * License. You may obtain a copy of the GNU General Public License
7
- * Version 2 or later at the following locations:
8
- *
9
- * http://www.opensource.org/licenses/gpl-license.html
10
- * http://www.gnu.org/copyleft/gpl.html
115 */
126
137 #include <linux/clk.h>
....@@ -393,8 +387,10 @@
393387
394388 root = of_find_node_by_path("/");
395389 ret = of_property_read_string(root, "model", &soc_dev_attr->machine);
396
- if (ret)
390
+ if (ret) {
391
+ kfree(soc_dev_attr);
397392 return;
393
+ }
398394
399395 soc_dev_attr->family = "Freescale MXS Family";
400396 soc_dev_attr->soc_id = mxs_get_soc_id();