aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorGravatar Antti Palosaari <crope@iki.fi> 2014-12-06 14:04:05 -0300
committerGravatar Mauro Carvalho Chehab <mchehab@osg.samsung.com> 2015-01-29 18:47:45 -0200
commit7cbf5d7651ca7ab91b57d194f388d8886dbe4c38 (patch)
tree5e250953d699bef0ac7b5f0c20e74d08ae85b778 /drivers/media/tuners
parent[media] si2157: rename device state variable from 's' to 'dev' (diff)
downloadlinux-7cbf5d7651ca7ab91b57d194f388d8886dbe4c38.tar.gz
linux-7cbf5d7651ca7ab91b57d194f388d8886dbe4c38.tar.bz2
linux-7cbf5d7651ca7ab91b57d194f388d8886dbe4c38.zip
[media] si2157: simplify si2157_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>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r--drivers/media/tuners/si2157.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 14d2f7363149..f7c38678f805 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -65,15 +65,11 @@ static int si2157_cmd_execute(struct si2157_dev *dev, struct si2157_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(&dev->client->dev, "failed=%d\n", ret);
return ret;
}