diff options
Diffstat (limited to 'drivers/mfd/smsc-ece1099.c')
-rw-r--r-- | drivers/mfd/smsc-ece1099.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mfd/smsc-ece1099.c b/drivers/mfd/smsc-ece1099.c index 7f89e89b8a5e..cd18c09827ef 100644 --- a/drivers/mfd/smsc-ece1099.c +++ b/drivers/mfd/smsc-ece1099.c @@ -36,7 +36,7 @@ static int smsc_i2c_probe(struct i2c_client *i2c, { struct smsc *smsc; int devid, rev, venid_l, venid_h; - int ret = 0; + int ret; smsc = devm_kzalloc(&i2c->dev, sizeof(struct smsc), GFP_KERNEL); @@ -46,10 +46,8 @@ static int smsc_i2c_probe(struct i2c_client *i2c, } smsc->regmap = devm_regmap_init_i2c(i2c, &smsc_regmap_config); - if (IS_ERR(smsc->regmap)) { - ret = PTR_ERR(smsc->regmap); - goto err; - } + if (IS_ERR(smsc->regmap)) + return PTR_ERR(smsc->regmap); i2c_set_clientdata(i2c, smsc); smsc->dev = &i2c->dev; @@ -68,7 +66,7 @@ static int smsc_i2c_probe(struct i2c_client *i2c, ret = regmap_write(smsc->regmap, SMSC_CLK_CTRL, smsc->clk); if (ret) - goto err; + return ret; #ifdef CONFIG_OF if (i2c->dev.of_node) @@ -76,7 +74,6 @@ static int smsc_i2c_probe(struct i2c_client *i2c, NULL, NULL, &i2c->dev); #endif -err: return ret; } |