@@ -1028,6 +1028,11 @@ static int vc5_probe(struct i2c_client *client)
1028
1028
}
1029
1029
1030
1030
init .name = kasprintf (GFP_KERNEL , "%pOFn.mux" , client -> dev .of_node );
1031
+ if (!init .name ) {
1032
+ ret = - ENOMEM ;
1033
+ goto err_clk ;
1034
+ }
1035
+
1031
1036
init .ops = & vc5_mux_ops ;
1032
1037
init .flags = 0 ;
1033
1038
init .parent_names = parent_names ;
@@ -1042,6 +1047,10 @@ static int vc5_probe(struct i2c_client *client)
1042
1047
memset (& init , 0 , sizeof (init ));
1043
1048
init .name = kasprintf (GFP_KERNEL , "%pOFn.dbl" ,
1044
1049
client -> dev .of_node );
1050
+ if (!init .name ) {
1051
+ ret = - ENOMEM ;
1052
+ goto err_clk ;
1053
+ }
1045
1054
init .ops = & vc5_dbl_ops ;
1046
1055
init .flags = CLK_SET_RATE_PARENT ;
1047
1056
init .parent_names = parent_names ;
@@ -1057,6 +1066,10 @@ static int vc5_probe(struct i2c_client *client)
1057
1066
/* Register PFD */
1058
1067
memset (& init , 0 , sizeof (init ));
1059
1068
init .name = kasprintf (GFP_KERNEL , "%pOFn.pfd" , client -> dev .of_node );
1069
+ if (!init .name ) {
1070
+ ret = - ENOMEM ;
1071
+ goto err_clk ;
1072
+ }
1060
1073
init .ops = & vc5_pfd_ops ;
1061
1074
init .flags = CLK_SET_RATE_PARENT ;
1062
1075
init .parent_names = parent_names ;
@@ -1074,6 +1087,10 @@ static int vc5_probe(struct i2c_client *client)
1074
1087
/* Register PLL */
1075
1088
memset (& init , 0 , sizeof (init ));
1076
1089
init .name = kasprintf (GFP_KERNEL , "%pOFn.pll" , client -> dev .of_node );
1090
+ if (!init .name ) {
1091
+ ret = - ENOMEM ;
1092
+ goto err_clk ;
1093
+ }
1077
1094
init .ops = & vc5_pll_ops ;
1078
1095
init .flags = CLK_SET_RATE_PARENT ;
1079
1096
init .parent_names = parent_names ;
@@ -1093,6 +1110,10 @@ static int vc5_probe(struct i2c_client *client)
1093
1110
memset (& init , 0 , sizeof (init ));
1094
1111
init .name = kasprintf (GFP_KERNEL , "%pOFn.fod%d" ,
1095
1112
client -> dev .of_node , idx );
1113
+ if (!init .name ) {
1114
+ ret = - ENOMEM ;
1115
+ goto err_clk ;
1116
+ }
1096
1117
init .ops = & vc5_fod_ops ;
1097
1118
init .flags = CLK_SET_RATE_PARENT ;
1098
1119
init .parent_names = parent_names ;
@@ -1111,6 +1132,10 @@ static int vc5_probe(struct i2c_client *client)
1111
1132
memset (& init , 0 , sizeof (init ));
1112
1133
init .name = kasprintf (GFP_KERNEL , "%pOFn.out0_sel_i2cb" ,
1113
1134
client -> dev .of_node );
1135
+ if (!init .name ) {
1136
+ ret = - ENOMEM ;
1137
+ goto err_clk ;
1138
+ }
1114
1139
init .ops = & vc5_clk_out_ops ;
1115
1140
init .flags = CLK_SET_RATE_PARENT ;
1116
1141
init .parent_names = parent_names ;
@@ -1137,6 +1162,10 @@ static int vc5_probe(struct i2c_client *client)
1137
1162
memset (& init , 0 , sizeof (init ));
1138
1163
init .name = kasprintf (GFP_KERNEL , "%pOFn.out%d" ,
1139
1164
client -> dev .of_node , idx + 1 );
1165
+ if (!init .name ) {
1166
+ ret = - ENOMEM ;
1167
+ goto err_clk ;
1168
+ }
1140
1169
init .ops = & vc5_clk_out_ops ;
1141
1170
init .flags = CLK_SET_RATE_PARENT ;
1142
1171
init .parent_names = parent_names ;
0 commit comments