aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-12-05 12:30:44 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-01-29 15:41:11 -0500
commit4affbe1d0825dc3c9c5fcec8a4848d8bbdd718cb (patch)
treef428591902da5d392758588be91dfc5ab111d630
parent3de3583539390a6e0d5b780f0c16980462991f7c (diff)
[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 <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/dvb-frontends/si2168.c8
1 files changed, 2 insertions, 6 deletions
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)
66 } 66 }
67 } 67 }
68 68
69 ret = 0; 69 mutex_unlock(&dev->i2c_mutex);
70 return 0;
70 71
71err_mutex_unlock: 72err_mutex_unlock:
72 mutex_unlock(&dev->i2c_mutex); 73 mutex_unlock(&dev->i2c_mutex);
73 if (ret)
74 goto err;
75
76 return 0;
77err:
78 dev_dbg(&client->dev, "failed=%d\n", ret); 74 dev_dbg(&client->dev, "failed=%d\n", ret);
79 return ret; 75 return ret;
80} 76}