Skip to content
Permalink
Browse files

usb: device: Do not call callback when transfer is cancelled

Only call callback when transfer is not cancelled.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and carlescufi committed May 16, 2019
1 parent bf76b2a commit f206170c655c433f25691728a22d675e15ad6d78
Showing with 3 additions and 1 deletion.
  1. +3 −1 subsys/usb/usb_device.c
@@ -1297,7 +1297,9 @@ static void usb_transfer_work(struct k_work *item)
k_sem_give(&trans->sem);

/* Transfer completion callback */
cb(ep, tsize, priv);
if (trans->status != -ECANCELED) {
cb(ep, tsize, priv);
}
}
}

0 comments on commit f206170

Please sign in to comment.
You can’t perform that action at this time.