diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2013-07-12 07:32:04 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-07-30 20:02:57 -0400 |
commit | ecc8fa1c85853a7d8736a920b1b3611c2333a190 (patch) | |
tree | 021f92bcdfeb38e385f88afa1efc964529fe8d3a /drivers/mfd/twl6040.c | |
parent | 37aefe9f05a802a2f6f39642ae9f6ca8538df3a9 (diff) |
mfd: twl6040: Cleanup in early error handling in probe function
The err: label is not needed we can just return instead of the jump there.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/twl6040.c')
-rw-r--r-- | drivers/mfd/twl6040.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index 3bd110e7f518..4d8d3b74d4e3 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c | |||
@@ -533,16 +533,12 @@ static int twl6040_probe(struct i2c_client *client, | |||
533 | 533 | ||
534 | twl6040 = devm_kzalloc(&client->dev, sizeof(struct twl6040), | 534 | twl6040 = devm_kzalloc(&client->dev, sizeof(struct twl6040), |
535 | GFP_KERNEL); | 535 | GFP_KERNEL); |
536 | if (!twl6040) { | 536 | if (!twl6040) |
537 | ret = -ENOMEM; | 537 | return -ENOMEM; |
538 | goto err; | ||
539 | } | ||
540 | 538 | ||
541 | twl6040->regmap = devm_regmap_init_i2c(client, &twl6040_regmap_config); | 539 | twl6040->regmap = devm_regmap_init_i2c(client, &twl6040_regmap_config); |
542 | if (IS_ERR(twl6040->regmap)) { | 540 | if (IS_ERR(twl6040->regmap)) |
543 | ret = PTR_ERR(twl6040->regmap); | 541 | return PTR_ERR(twl6040->regmap); |
544 | goto err; | ||
545 | } | ||
546 | 542 | ||
547 | i2c_set_clientdata(client, twl6040); | 543 | i2c_set_clientdata(client, twl6040); |
548 | 544 | ||
@@ -660,7 +656,7 @@ gpio_err: | |||
660 | regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); | 656 | regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); |
661 | regulator_get_err: | 657 | regulator_get_err: |
662 | i2c_set_clientdata(client, NULL); | 658 | i2c_set_clientdata(client, NULL); |
663 | err: | 659 | |
664 | return ret; | 660 | return ret; |
665 | } | 661 | } |
666 | 662 | ||