2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00

staging: wlan-ng: replace BUG_ON() into WARN_ON() on hfa384x_usbin_callback

This patch avoids using BUG_ON() from driver,
and return from hfa384x_usbin_callback with WARN_ON()
if skb was NULL or data in skb is different from expected one.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sergio Paracuellos 2016-11-07 18:55:21 +01:00 committed by Greg Kroah-Hartman
parent 3883cd56b5
commit 1bca0df4ab

View File

@ -3057,7 +3057,10 @@ static void hfa384x_usbin_callback(struct urb *urb)
goto exit;
skb = hw->rx_urb_skb;
BUG_ON(!skb || (skb->data != urb->transfer_buffer));
if (!skb || (skb->data != urb->transfer_buffer)) {
WARN_ON(1);
return;
}
hw->rx_urb_skb = NULL;