[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>
This commit is contained in:
parent
3de3583539
commit
4affbe1d08
1 changed files with 2 additions and 6 deletions
|
@ -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:
|
err_mutex_unlock:
|
||||||
mutex_unlock(&dev->i2c_mutex);
|
mutex_unlock(&dev->i2c_mutex);
|
||||||
if (ret)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
err:
|
|
||||||
dev_dbg(&client->dev, "failed=%d\n", ret);
|
dev_dbg(&client->dev, "failed=%d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue