summaryrefslogtreecommitdiff
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2016-11-07 18:55:21 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 13:25:32 +0100
commit1bca0df4ab8649ec875cbc1b2808367fa9587ad0 (patch)
tree9f84165bf99221bedf852d8258c5772f3e64c3ac /drivers/staging/wlan-ng
parent3883cd56b536f4ed3c1abd24bfea798ffb7164e1 (diff)
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>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index d234ed76ab1a..349f12250d77 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -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;