diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-12-16 11:49:07 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-01-27 07:15:58 -0500 |
commit | 7657e0647c47393bc61b4e398b4d791350820bd1 (patch) | |
tree | 535e9f006eccb52fc17b199ebc7c1279b3dcca64 /drivers/media/i2c | |
parent | 88ca3af44beb281979e3f037d167cc3fec68c9de (diff) |
[media] adv7180: Remove the unneeded 'err' label
There is no need to jump to the 'err' label as we can simply return the error
code directly and make the code shorter.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/adv7180.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index bffe6eb528a3..94a3341b091b 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c | |||
@@ -616,10 +616,8 @@ static int adv7180_probe(struct i2c_client *client, | |||
616 | client->addr, client->adapter->name); | 616 | client->addr, client->adapter->name); |
617 | 617 | ||
618 | state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); | 618 | state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); |
619 | if (state == NULL) { | 619 | if (state == NULL) |
620 | ret = -ENOMEM; | 620 | return -ENOMEM; |
621 | goto err; | ||
622 | } | ||
623 | 621 | ||
624 | state->irq = client->irq; | 622 | state->irq = client->irq; |
625 | mutex_init(&state->mutex); | 623 | mutex_init(&state->mutex); |
@@ -649,7 +647,6 @@ err_free_ctrl: | |||
649 | adv7180_exit_controls(state); | 647 | adv7180_exit_controls(state); |
650 | err_unreg_subdev: | 648 | err_unreg_subdev: |
651 | mutex_destroy(&state->mutex); | 649 | mutex_destroy(&state->mutex); |
652 | err: | ||
653 | return ret; | 650 | return ret; |
654 | } | 651 | } |
655 | 652 | ||