From 1bca0df4ab8649ec875cbc1b2808367fa9587ad0 Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Mon, 7 Nov 2016 18:55:21 +0100 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/staging/wlan-ng') 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; -- cgit v1.2.3