From 4affbe1d0825dc3c9c5fcec8a4848d8bbdd718cb Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Fri, 5 Dec 2014 14:30:44 -0300 Subject: [media] si2168: simplify si2168_cmd_execute() error path Remove if () from firmware command error path as there should not be any error prone conditional logic there. Use goto labels instead. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/si2168.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/media/dvb-frontends/si2168.c') diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index e00bc0467356..3c102e519312 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -66,15 +66,11 @@ static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd) } } - ret = 0; + mutex_unlock(&dev->i2c_mutex); + return 0; err_mutex_unlock: mutex_unlock(&dev->i2c_mutex); - if (ret) - goto err; - - return 0; -err: dev_dbg(&client->dev, "failed=%d\n", ret); return ret; } -- cgit