[media] adv7180: Remove the unneeded 'err' label
authorFabio Estevam <[email protected]>
Tue, 16 Dec 2014 16:49:07 +0000 (13:49 -0300)
committerMauro Carvalho Chehab <[email protected]>
Tue, 27 Jan 2015 12:15:58 +0000 (10:15 -0200)
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 <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/i2c/adv7180.c

index bffe6eb528a3bab7866e4eb69170fbac9965e3a2..94a3341b091bf0d56ad7cdcac85638096e78abbc 100644 (file)
@@ -616,10 +616,8 @@ static int adv7180_probe(struct i2c_client *client,
                 client->addr, client->adapter->name);
 
        state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL);
-       if (state == NULL) {
-               ret = -ENOMEM;
-               goto err;
-       }
+       if (state == NULL)
+               return -ENOMEM;
 
        state->irq = client->irq;
        mutex_init(&state->mutex);
@@ -649,7 +647,6 @@ err_free_ctrl:
        adv7180_exit_controls(state);
 err_unreg_subdev:
        mutex_destroy(&state->mutex);
-err:
        return ret;
 }