]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 17:44:25 +0000 (13:44 -0400)
commitb564fffd16b54d78e1d340606dfaed8854cb6c5f
tree1347e9d6b35a128bc825268b7c462aebd2e9b828
parent6d6082fff4f1646920ab95303c0037661b39fe4c
clocksource/imx-tpm: Correct -ETIME return condition check

BugLink: http://bugs.launchpad.net/bugs/1774063
commit 7407188489c62a7b5694bc75a6db2b82af94c9a5 upstream.

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: 059ab7b82eec ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/clocksource/timer-imx-tpm.c