The current code gets the start time before copying the IR from
userspace (could cause page faults) and encoding IR. This means
that the gap calculation could be off.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
if (!dev->tx_ir) {
ret = -EINVAL;
goto out_unlock;
if (!dev->tx_ir) {
ret = -EINVAL;
goto out_unlock;
ret = dev->tx_ir(dev, txbuf, count);
if (ret < 0)
goto out_kfree;
ret = dev->tx_ir(dev, txbuf, count);
if (ret < 0)
goto out_kfree;