Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fb9edcb authored by Mark A. Greer's avatar Mark A. Greer Committed by Samuel Ortiz
Browse files

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: default avatarMark A. Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 851ee3cb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);

	cancel_delayed_work(&trf->timeout_work);

	kfree_skb(trf->rx_skb);
	trf->rx_skb = ERR_PTR(errno);