mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
misc: tegra_cec: fixing return values for wait
This change fixes the code that was checking the return value for the wait_event_interruptible_timeout. Change-Id: Ief6c180f1df9994dd6caa776e08cdb26e15bb32b Signed-off-by: Aly Hirani <ahirani@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1742938 (cherry picked from commit 8e4b55aa0571a10acf106d21f7c70b2d8b8108c6) Reviewed-on: https://git-master.nvidia.com/r/1746696 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vinayak Pane <vpane@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Prafull Suryawanshi
parent
0e3c13c2f1
commit
4ca144139b
@@ -124,8 +124,9 @@ int tegra_cec_native_write_l(struct tegra_cec *cec, const u8 *buf, size_t cnt)
|
||||
* this means we have to wait for it to finish before beginning
|
||||
* subsequent transmission.
|
||||
*/
|
||||
ret = wait_event_interruptible_timeout(cec->tx_waitq, cec->tx_wake == 1, HZ);
|
||||
if (ret)
|
||||
ret = wait_event_interruptible_timeout(cec->tx_waitq, cec->tx_wake == 1,
|
||||
msecs_to_jiffies(1000));
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
|
||||
mode = TEGRA_CEC_LADDR_MODE(buf[0]) << TEGRA_CEC_TX_REG_ADDR_MODE_SHIFT;
|
||||
@@ -145,8 +146,9 @@ int tegra_cec_native_write_l(struct tegra_cec *cec, const u8 *buf, size_t cnt)
|
||||
writel(mask | TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY,
|
||||
cec->cec_base + TEGRA_CEC_INT_MASK);
|
||||
|
||||
ret = wait_event_interruptible_timeout(cec->tx_waitq, cec->tx_wake == 1, HZ);
|
||||
if (!ret)
|
||||
ret = wait_event_interruptible_timeout(cec->tx_waitq, cec->tx_wake == 1,
|
||||
msecs_to_jiffies(1000));
|
||||
if (ret > 0)
|
||||
ret = cec->tx_error;
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user