nfc: port100: handle command failure cleanly
Subsystems (3)
PATCH 1/1 nfc: port100: handle command failure cleanly
If starting the transfer of a command suceeds but the transfer for the reply fails, it is not enough to initiate killing the transfer for the command may still be running. You need to wait for the killing to finish before you can reuse URB and buffer.
Reported-and-tested-by [email protected]
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/nfc/port100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/port100.c +1 -1
@@ -783,7 +783,7 @@ static int port100_send_frame_async(struct port100 *dev, struct sk_buff *out, rc =port100_submit_urb_for_ack (dev,GFP_KERNEL );if (rc) -usb_unlink_urb (dev->out_urb); +usb_kill_urb (dev->out_urb); exit:mutex_unlock (&dev->out_urb_lock);
Signature · 1 line
2.16.4
From: Oliver Neukum <[email protected]>
Date: Thu, 21 Nov 2019 11:37:10 +0100
Quoted 7 lines
If starting the transfer of a command suceeds but the transfer for the reply fails, it is not enough to initiate killing the transfer for the command may still be running. You need to wait for the killing to finish before you can reuse URB and buffer.
Reported-and-tested-by [email protected]Signed-off-by Oliver Neukum <[email protected]>
Applied.