hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/iommu/fsl_pamu.c
....@@ -1,19 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License, version 2, as
4
- * published by the Free Software Foundation.
5
- *
6
- * This program is distributed in the hope that it will be useful,
7
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
8
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
- * GNU General Public License for more details.
10
- *
11
- * You should have received a copy of the GNU General Public License
12
- * along with this program; if not, write to the Free Software
13
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
143 *
154 * Copyright (C) 2013 Freescale Semiconductor, Inc.
16
- *
175 */
186
197 #define pr_fmt(fmt) "fsl-pamu: %s: " fmt, __func__
....@@ -543,7 +531,7 @@
543531 return ~(u32)0;
544532 }
545533
546
- for_each_node_by_type(node, "cpu") {
534
+ for_each_of_cpu_node(node) {
547535 prop = of_get_property(node, "reg", &len);
548536 for (i = 0; i < len / sizeof(u32); i++) {
549537 if (be32_to_cpup(&prop[i]) == vcpu) {
....@@ -1134,7 +1122,7 @@
11341122 ret = create_csd(ppaact_phys, mem_size, csd_port_id);
11351123 if (ret) {
11361124 dev_err(dev, "could not create coherence subdomain\n");
1137
- return ret;
1125
+ goto error;
11381126 }
11391127 }
11401128
....@@ -1186,10 +1174,7 @@
11861174 if (irq != NO_IRQ)
11871175 free_irq(irq, data);
11881176
1189
- if (data) {
1190
- memset(data, 0, sizeof(struct pamu_isr_data));
1191
- kfree(data);
1192
- }
1177
+ kfree_sensitive(data);
11931178
11941179 if (pamu_regs)
11951180 iounmap(pamu_regs);