.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2013 Emilio López |
---|
3 | 4 | * |
---|
4 | 5 | * Emilio López <emilio@elopez.com.ar> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
9 | | - * (at your option) any later version. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | 6 | */ |
---|
16 | 7 | |
---|
17 | 8 | #include <linux/clk.h> |
---|
18 | 9 | #include <linux/clk-provider.h> |
---|
19 | 10 | #include <linux/clkdev.h> |
---|
| 11 | +#include <linux/io.h> |
---|
20 | 12 | #include <linux/of.h> |
---|
21 | 13 | #include <linux/of_address.h> |
---|
22 | 14 | #include <linux/reset-controller.h> |
---|
.. | .. |
---|
568 | 560 | |
---|
569 | 561 | reg = of_iomap(node, 0); |
---|
570 | 562 | if (!reg) { |
---|
571 | | - pr_err("Could not get registers for factors-clk: %s\n", |
---|
572 | | - node->name); |
---|
| 563 | + pr_err("Could not get registers for factors-clk: %pOFn\n", |
---|
| 564 | + node); |
---|
573 | 565 | return NULL; |
---|
574 | 566 | } |
---|
575 | 567 | |
---|
.. | .. |
---|
988 | 980 | if (endp) { |
---|
989 | 981 | derived_name = kstrndup(clk_name, endp - clk_name, |
---|
990 | 982 | GFP_KERNEL); |
---|
| 983 | + if (!derived_name) |
---|
| 984 | + return NULL; |
---|
991 | 985 | factors.name = derived_name; |
---|
992 | 986 | } else { |
---|
993 | 987 | factors.name = clk_name; |
---|