@@ -930,10 +930,9 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id)
930
930
return - EPROBE_DEFER ;
931
931
932
932
vc5 -> regmap = devm_regmap_init_i2c (client , & vc5_regmap_config );
933
- if (IS_ERR (vc5 -> regmap )) {
934
- dev_err (& client -> dev , "failed to allocate register map\n" );
935
- return PTR_ERR (vc5 -> regmap );
936
- }
933
+ if (IS_ERR (vc5 -> regmap ))
934
+ return dev_err_probe (& client -> dev , PTR_ERR (vc5 -> regmap ),
935
+ "failed to allocate register map\n" );
937
936
938
937
/* Register clock input mux */
939
938
memset (& init , 0 , sizeof (init ));
@@ -957,10 +956,9 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id)
957
956
__clk_get_name (vc5 -> pin_clkin );
958
957
}
959
958
960
- if (!init .num_parents ) {
961
- dev_err (& client -> dev , "no input clock specified!\n" );
962
- return - EINVAL ;
963
- }
959
+ if (!init .num_parents )
960
+ return dev_err_probe (& client -> dev , - EINVAL ,
961
+ "no input clock specified!\n" );
964
962
965
963
/* Configure Optional Loading Capacitance for external XTAL */
966
964
if (!(vc5 -> chip_info -> flags & VC5_HAS_INTERNAL_XTAL )) {
@@ -1099,14 +1097,16 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id)
1099
1097
1100
1098
ret = of_clk_add_hw_provider (client -> dev .of_node , vc5_of_clk_get , vc5 );
1101
1099
if (ret ) {
1102
- dev_err (& client -> dev , "unable to add clk provider\n" );
1100
+ dev_err_probe (& client -> dev , ret ,
1101
+ "unable to add clk provider\n" );
1103
1102
goto err_clk ;
1104
1103
}
1105
1104
1106
1105
return 0 ;
1107
1106
1108
1107
err_clk_register :
1109
- dev_err (& client -> dev , "unable to register %s\n" , init .name );
1108
+ dev_err_probe (& client -> dev , ret ,
1109
+ "unable to register %s\n" , init .name );
1110
1110
kfree (init .name ); /* clock framework made a copy of the name */
1111
1111
err_clk :
1112
1112
if (vc5 -> chip_info -> flags & VC5_HAS_INTERNAL_XTAL )
0 commit comments