forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/pcmcia/rsrc_nonstatic.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * rsrc_nonstatic.c -- Resource management routines for !SS_CAP_STATIC_MAP sockets
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 *
85 * The initial developer of the original code is David A. Hinds
96 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
....@@ -1056,6 +1053,8 @@
10561053 q = p->next;
10571054 kfree(p);
10581055 }
1056
+
1057
+ kfree(data);
10591058 }
10601059
10611060
....@@ -1085,7 +1084,7 @@
10851084 for (p = data->io_db.next; p != &data->io_db; p = p->next) {
10861085 if (ret > (PAGE_SIZE - 10))
10871086 continue;
1088
- ret += snprintf(&buf[ret], (PAGE_SIZE - ret - 1),
1087
+ ret += scnprintf(&buf[ret], (PAGE_SIZE - ret - 1),
10891088 "0x%08lx - 0x%08lx\n",
10901089 ((unsigned long) p->base),
10911090 ((unsigned long) p->base + p->num - 1));
....@@ -1142,7 +1141,7 @@
11421141 p = p->next) {
11431142 if (ret > (PAGE_SIZE - 10))
11441143 continue;
1145
- ret += snprintf(&buf[ret], (PAGE_SIZE - ret - 1),
1144
+ ret += scnprintf(&buf[ret], (PAGE_SIZE - ret - 1),
11461145 "0x%08lx - 0x%08lx\n",
11471146 ((unsigned long) p->base),
11481147 ((unsigned long) p->base + p->num - 1));
....@@ -1151,7 +1150,7 @@
11511150 for (p = data->mem_db.next; p != &data->mem_db; p = p->next) {
11521151 if (ret > (PAGE_SIZE - 10))
11531152 continue;
1154
- ret += snprintf(&buf[ret], (PAGE_SIZE - ret - 1),
1153
+ ret += scnprintf(&buf[ret], (PAGE_SIZE - ret - 1),
11551154 "0x%08lx - 0x%08lx\n",
11561155 ((unsigned long) p->base),
11571156 ((unsigned long) p->base + p->num - 1));