@@ -930,10 +930,9 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id)
930930 return - EPROBE_DEFER ;
931931
932932 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" );
937936
938937 /* Register clock input mux */
939938 memset (& init , 0 , sizeof (init ));
@@ -957,10 +956,9 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id)
957956 __clk_get_name (vc5 -> pin_clkin );
958957 }
959958
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" );
964962
965963 /* Configure Optional Loading Capacitance for external XTAL */
966964 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)
10991097
11001098 ret = of_clk_add_hw_provider (client -> dev .of_node , vc5_of_clk_get , vc5 );
11011099 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" );
11031102 goto err_clk ;
11041103 }
11051104
11061105 return 0 ;
11071106
11081107err_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 );
11101110 kfree (init .name ); /* clock framework made a copy of the name */
11111111err_clk :
11121112 if (vc5 -> chip_info -> flags & VC5_HAS_INTERNAL_XTAL )
0 commit comments