From: Fabio Estevam Date: Tue, 16 Dec 2014 16:49:07 +0000 (-0300) Subject: [media] adv7180: Remove the unneeded 'err' label X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7657e0647c47393bc61b4e398b4d791350820bd1;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 Acked-by: Lars-Peter Clausen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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, 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; }