Commit 7cbf5d76 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[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: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 70f13ff0
...@@ -65,15 +65,11 @@ static int si2157_cmd_execute(struct si2157_dev *dev, struct si2157_cmd *cmd) ...@@ -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: err_mutex_unlock:
mutex_unlock(&dev->i2c_mutex); mutex_unlock(&dev->i2c_mutex);
if (ret)
goto err;
return 0;
err:
dev_dbg(&dev->client->dev, "failed=%d\n", ret); dev_dbg(&dev->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment