mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
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>
This commit is contained in:
parent
851ee3cbf8
commit
6fb9edcb43
1 changed files with 2 additions and 0 deletions
|
|
@ -506,6 +506,8 @@ static void trf7970a_send_err_upstream(struct trf7970a *trf, int errno)
|
||||||
{
|
{
|
||||||
dev_dbg(trf->dev, "Error - state: %d, errno: %d\n", trf->state, errno);
|
dev_dbg(trf->dev, "Error - state: %d, errno: %d\n", trf->state, errno);
|
||||||
|
|
||||||
|
cancel_delayed_work(&trf->timeout_work);
|
||||||
|
|
||||||
kfree_skb(trf->rx_skb);
|
kfree_skb(trf->rx_skb);
|
||||||
trf->rx_skb = ERR_PTR(errno);
|
trf->rx_skb = ERR_PTR(errno);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue