| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2014 STMicroelectronics R&D Ltd |
|---|
| 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. |
|---|
| 7 | | - * |
|---|
| 8 | 4 | */ |
|---|
| 9 | 5 | |
|---|
| 10 | 6 | /* |
|---|
| .. | .. |
|---|
| 71 | 67 | }; |
|---|
| 72 | 68 | |
|---|
| 73 | 69 | static const struct clk_ops st_quadfs_pll_c32_ops; |
|---|
| 74 | | -static const struct clk_ops st_quadfs_fs660c32_ops; |
|---|
| 75 | 70 | |
|---|
| 76 | 71 | static int clk_fs660c32_dig_get_params(unsigned long input, |
|---|
| 77 | 72 | unsigned long output, struct stm_fs *fs); |
|---|
| .. | .. |
|---|
| 390 | 385 | { |
|---|
| 391 | 386 | struct st_clk_quadfs_pll *pll; |
|---|
| 392 | 387 | struct clk *clk; |
|---|
| 393 | | - struct clk_init_data init = {}; |
|---|
| 388 | + struct clk_init_data init; |
|---|
| 394 | 389 | |
|---|
| 395 | 390 | /* |
|---|
| 396 | 391 | * Sanity check required pointers. |
|---|
| .. | .. |
|---|
| 404 | 399 | |
|---|
| 405 | 400 | init.name = name; |
|---|
| 406 | 401 | init.ops = quadfs->pll_ops; |
|---|
| 407 | | - init.flags = CLK_IS_BASIC | CLK_GET_RATE_NOCACHE; |
|---|
| 402 | + init.flags = CLK_GET_RATE_NOCACHE; |
|---|
| 408 | 403 | init.parent_names = &parent_name; |
|---|
| 409 | 404 | init.num_parents = 1; |
|---|
| 410 | 405 | |
|---|
| .. | .. |
|---|
| 795 | 790 | struct st_clk_quadfs_fsynth *fs = to_quadfs_fsynth(hw); |
|---|
| 796 | 791 | struct stm_fs params; |
|---|
| 797 | 792 | long hwrate; |
|---|
| 798 | | - int uninitialized_var(i); |
|---|
| 799 | 793 | |
|---|
| 800 | 794 | if (!rate || !parent_rate) |
|---|
| 801 | 795 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 829 | 823 | { |
|---|
| 830 | 824 | struct st_clk_quadfs_fsynth *fs; |
|---|
| 831 | 825 | struct clk *clk; |
|---|
| 832 | | - struct clk_init_data init = {}; |
|---|
| 826 | + struct clk_init_data init; |
|---|
| 833 | 827 | |
|---|
| 834 | 828 | /* |
|---|
| 835 | 829 | * Sanity check required pointers, note that nsdiv3 is optional. |
|---|
| .. | .. |
|---|
| 843 | 837 | |
|---|
| 844 | 838 | init.name = name; |
|---|
| 845 | 839 | init.ops = &st_quadfs_ops; |
|---|
| 846 | | - init.flags = flags | CLK_GET_RATE_NOCACHE | CLK_IS_BASIC; |
|---|
| 840 | + init.flags = flags | CLK_GET_RATE_NOCACHE; |
|---|
| 847 | 841 | init.parent_names = &parent_name; |
|---|
| 848 | 842 | init.num_parents = 1; |
|---|
| 849 | 843 | |
|---|
| .. | .. |
|---|
| 936 | 930 | if (!clk_parent_name) |
|---|
| 937 | 931 | return; |
|---|
| 938 | 932 | |
|---|
| 939 | | - pll_name = kasprintf(GFP_KERNEL, "%s.pll", np->name); |
|---|
| 933 | + pll_name = kasprintf(GFP_KERNEL, "%pOFn.pll", np); |
|---|
| 940 | 934 | if (!pll_name) |
|---|
| 941 | 935 | return; |
|---|
| 942 | 936 | |
|---|
| .. | .. |
|---|
| 948 | 942 | |
|---|
| 949 | 943 | clk = st_clk_register_quadfs_pll(pll_name, clk_parent_name, data, |
|---|
| 950 | 944 | reg, lock); |
|---|
| 951 | | - if (IS_ERR(clk)) |
|---|
| 945 | + if (IS_ERR(clk)) { |
|---|
| 946 | + kfree(lock); |
|---|
| 952 | 947 | goto err_exit; |
|---|
| 953 | | - else |
|---|
| 948 | + } else |
|---|
| 954 | 949 | pr_debug("%s: parent %s rate %u\n", |
|---|
| 955 | 950 | __clk_get_name(clk), |
|---|
| 956 | 951 | __clk_get_name(clk_get_parent(clk)), |
|---|