forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-16 50a212ec906f7524620675f0c57357691c26c81f
kernel/arch/mips/lantiq/falcon/sysctrl.c
....@@ -1,7 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
2
- * This program is free software; you can redistribute it and/or modify it
3
- * under the terms of the GNU General Public License version 2 as published
4
- * by the Free Software Foundation.
53 *
64 * Copyright (C) 2011 Thomas Langer <thomas.langer@lantiq.com>
75 * Copyright (C) 2011 John Crispin <john@phrozen.org>
....@@ -169,6 +167,8 @@
169167 {
170168 struct clk *clk = kzalloc(sizeof(struct clk), GFP_KERNEL);
171169
170
+ if (!clk)
171
+ return;
172172 clk->cl.dev_id = dev;
173173 clk->cl.con_id = NULL;
174174 clk->cl.clk = clk;
....@@ -223,16 +223,16 @@
223223 res_sys[2].name) < 0))
224224 pr_err("Failed to request core resources");
225225
226
- status_membase = ioremap_nocache(res_status.start,
226
+ status_membase = ioremap(res_status.start,
227227 resource_size(&res_status));
228
- ltq_ebu_membase = ioremap_nocache(res_ebu.start,
228
+ ltq_ebu_membase = ioremap(res_ebu.start,
229229 resource_size(&res_ebu));
230230
231231 if (!status_membase || !ltq_ebu_membase)
232232 panic("Failed to remap core resources");
233233
234234 for (i = 0; i < 3; i++) {
235
- sysctl_membase[i] = ioremap_nocache(res_sys[i].start,
235
+ sysctl_membase[i] = ioremap(res_sys[i].start,
236236 resource_size(&res_sys[i]));
237237 if (!sysctl_membase[i])
238238 panic("Failed to remap sysctrl resources");