Skip to content

Commit 5f9f0b1

Browse files
oneukumdavem330
authored andcommitted
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]> Signed-off-by: David S. Miller <[email protected]>
1 parent 48a322b commit 5f9f0b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nfc/port100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static int port100_send_frame_async(struct port100 *dev, struct sk_buff *out,
783783

784784
rc = port100_submit_urb_for_ack(dev, GFP_KERNEL);
785785
if (rc)
786-
usb_unlink_urb(dev->out_urb);
786+
usb_kill_urb(dev->out_urb);
787787

788788
exit:
789789
mutex_unlock(&dev->out_urb_lock);

0 commit comments

Comments
 (0)