.. | .. |
---|
8 | 8 | |
---|
9 | 9 | #include <linux/clk.h> |
---|
10 | 10 | #include <linux/clk-provider.h> |
---|
| 11 | +#include <linux/io.h> |
---|
11 | 12 | #include <linux/kernel.h> |
---|
12 | 13 | #include <linux/of.h> |
---|
13 | 14 | #include <linux/of_address.h> |
---|
.. | .. |
---|
499 | 500 | int n, ret; |
---|
500 | 501 | |
---|
501 | 502 | clk_data = kzalloc(struct_size(clk_data, hws, MAX_CLKS), GFP_KERNEL); |
---|
502 | | - if (!clk_data) |
---|
| 503 | + if (!clk_data) { |
---|
| 504 | + of_node_put(parent_np); |
---|
503 | 505 | return; |
---|
| 506 | + } |
---|
504 | 507 | clk_data->num = MAX_CLKS; |
---|
505 | 508 | hws = clk_data->hws; |
---|
506 | 509 | |
---|
507 | 510 | gbase = of_iomap(parent_np, 0); |
---|
| 511 | + of_node_put(parent_np); |
---|
508 | 512 | if (!gbase) |
---|
509 | 513 | return; |
---|
510 | 514 | |
---|