[media] si2168: simplify si2168_cmd_execute() error path
authorAntti Palosaari <crope@iki.fi>
Fri, 5 Dec 2014 17:30:44 +0000 (14:30 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 29 Jan 2015 20:41:11 +0000 (18:41 -0200)
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>
drivers/media/dvb-frontends/si2168.c

index e00bc04673565c019483f8cf0cb0cb0c1a3aaec6..3c102e519312d29effa9cfb2018649f12957d046 100644 (file)
@@ -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;
 }