.. | .. |
---|
906 | 906 | } |
---|
907 | 907 | |
---|
908 | 908 | init.name = kasprintf(GFP_KERNEL, "%pOFn.mux", client->dev.of_node); |
---|
| 909 | + if (!init.name) { |
---|
| 910 | + ret = -ENOMEM; |
---|
| 911 | + goto err_clk; |
---|
| 912 | + } |
---|
| 913 | + |
---|
909 | 914 | init.ops = &vc5_mux_ops; |
---|
910 | 915 | init.flags = 0; |
---|
911 | 916 | init.parent_names = parent_names; |
---|
.. | .. |
---|
920 | 925 | memset(&init, 0, sizeof(init)); |
---|
921 | 926 | init.name = kasprintf(GFP_KERNEL, "%pOFn.dbl", |
---|
922 | 927 | client->dev.of_node); |
---|
| 928 | + if (!init.name) { |
---|
| 929 | + ret = -ENOMEM; |
---|
| 930 | + goto err_clk; |
---|
| 931 | + } |
---|
923 | 932 | init.ops = &vc5_dbl_ops; |
---|
924 | 933 | init.flags = CLK_SET_RATE_PARENT; |
---|
925 | 934 | init.parent_names = parent_names; |
---|
.. | .. |
---|
935 | 944 | /* Register PFD */ |
---|
936 | 945 | memset(&init, 0, sizeof(init)); |
---|
937 | 946 | init.name = kasprintf(GFP_KERNEL, "%pOFn.pfd", client->dev.of_node); |
---|
| 947 | + if (!init.name) { |
---|
| 948 | + ret = -ENOMEM; |
---|
| 949 | + goto err_clk; |
---|
| 950 | + } |
---|
938 | 951 | init.ops = &vc5_pfd_ops; |
---|
939 | 952 | init.flags = CLK_SET_RATE_PARENT; |
---|
940 | 953 | init.parent_names = parent_names; |
---|
.. | .. |
---|
952 | 965 | /* Register PLL */ |
---|
953 | 966 | memset(&init, 0, sizeof(init)); |
---|
954 | 967 | init.name = kasprintf(GFP_KERNEL, "%pOFn.pll", client->dev.of_node); |
---|
| 968 | + if (!init.name) { |
---|
| 969 | + ret = -ENOMEM; |
---|
| 970 | + goto err_clk; |
---|
| 971 | + } |
---|
955 | 972 | init.ops = &vc5_pll_ops; |
---|
956 | 973 | init.flags = CLK_SET_RATE_PARENT; |
---|
957 | 974 | init.parent_names = parent_names; |
---|
.. | .. |
---|
971 | 988 | memset(&init, 0, sizeof(init)); |
---|
972 | 989 | init.name = kasprintf(GFP_KERNEL, "%pOFn.fod%d", |
---|
973 | 990 | client->dev.of_node, idx); |
---|
| 991 | + if (!init.name) { |
---|
| 992 | + ret = -ENOMEM; |
---|
| 993 | + goto err_clk; |
---|
| 994 | + } |
---|
974 | 995 | init.ops = &vc5_fod_ops; |
---|
975 | 996 | init.flags = CLK_SET_RATE_PARENT; |
---|
976 | 997 | init.parent_names = parent_names; |
---|
.. | .. |
---|
989 | 1010 | memset(&init, 0, sizeof(init)); |
---|
990 | 1011 | init.name = kasprintf(GFP_KERNEL, "%pOFn.out0_sel_i2cb", |
---|
991 | 1012 | client->dev.of_node); |
---|
| 1013 | + if (!init.name) { |
---|
| 1014 | + ret = -ENOMEM; |
---|
| 1015 | + goto err_clk; |
---|
| 1016 | + } |
---|
992 | 1017 | init.ops = &vc5_clk_out_ops; |
---|
993 | 1018 | init.flags = CLK_SET_RATE_PARENT; |
---|
994 | 1019 | init.parent_names = parent_names; |
---|
.. | .. |
---|
1015 | 1040 | memset(&init, 0, sizeof(init)); |
---|
1016 | 1041 | init.name = kasprintf(GFP_KERNEL, "%pOFn.out%d", |
---|
1017 | 1042 | client->dev.of_node, idx + 1); |
---|
| 1043 | + if (!init.name) { |
---|
| 1044 | + ret = -ENOMEM; |
---|
| 1045 | + goto err_clk; |
---|
| 1046 | + } |
---|
1018 | 1047 | init.ops = &vc5_clk_out_ops; |
---|
1019 | 1048 | init.flags = CLK_SET_RATE_PARENT; |
---|
1020 | 1049 | init.parent_names = parent_names; |
---|