]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/imx-tpm: Correct -ETIME return condition check
authorAnson Huang <Anson.Huang@nxp.com>
Thu, 19 Apr 2018 06:04:43 +0000 (14:04 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 19 Apr 2018 11:21:35 +0000 (13:21 +0200)
commit4ec7f15944b88c0bb0ae7464a09304dc8ac3a03b
tree631c026b6f598d5654cd6a924eb7c03daf1501d6
parent0f1070c521eaef95c8a1f7f187684cbb3742a95e
clocksource/imx-tpm: Correct -ETIME return condition check

The additional brakects added to tpm_set_next_event's return value
computation causes (int) forced type conversion NOT taking effect, and the
incorrect value return will cause various system timer issue, like RCU
stall etc..

Remove the additional brackets to make sure tpm_set_next_event always
returns correct value.

Fixes: 3d00f846c15a ("clocksource/drivers/imx-tpm: Add imx tpm timer support")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Dong Aisheng <Aisheng.dong@nxp.com>
Cc: stable@vger.kernel.org
Cc: daniel.lezcano@linaro.org
Cc: Linux-imx@nxp.com
Link: https://lkml.kernel.org/r/1524117883-2484-1-git-send-email-Anson.Huang@nxp.com
drivers/clocksource/timer-imx-tpm.c