diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2014-09-02 18:12:43 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-07 17:13:45 -0400 |
commit | 6fb9edcb43d0b1bf0ac2aaf6ba488d105c45f477 (patch) | |
tree | d3f462e5c3467f77ef894733572afb757c281dcc | |
parent | 851ee3cbf850501104e76683e439a4061f378a96 (diff) |
NFC: trf7970a: Cancel timer when error encountered
Some paths leave a timer still running when
trf7970a_send_err_upstream() is called. This
can cause a timeout to occur in a subsequent
transaction making it fail. Fix this by ensuring
there is no timer running before sending an error
upstream.
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/nfc/trf7970a.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index 0f09278ec37a..00fb2cee6790 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c | |||
@@ -506,6 +506,8 @@ static void trf7970a_send_err_upstream(struct trf7970a *trf, int errno) | |||
506 | { | 506 | { |
507 | dev_dbg(trf->dev, "Error - state: %d, errno: %d\n", trf->state, errno); | 507 | dev_dbg(trf->dev, "Error - state: %d, errno: %d\n", trf->state, errno); |
508 | 508 | ||
509 | cancel_delayed_work(&trf->timeout_work); | ||
510 | |||
509 | kfree_skb(trf->rx_skb); | 511 | kfree_skb(trf->rx_skb); |
510 | trf->rx_skb = ERR_PTR(errno); | 512 | trf->rx_skb = ERR_PTR(errno); |
511 | 513 | ||