2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 06:04:14 +08:00

[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>
This commit is contained in:
Antti Palosaari 2014-12-06 14:04:05 -03:00 committed by Mauro Carvalho Chehab
parent 70f13ff091
commit 7cbf5d7651

View File

@ -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;
}