Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: BUG to BUG_ON changes

Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Stoyan Gaydarov and committed by
Greg Kroah-Hartman
2961f24f 0773a5c0

+5 -10
+2 -4
drivers/staging/comedi/drivers.c
··· 544 544 545 545 if (s->munge == NULL || (async->cmd.flags & CMDF_RAWDATA)) { 546 546 async->munge_count += num_bytes; 547 - if ((int)(async->munge_count - async->buf_write_count) > 0) 548 - BUG(); 547 + BUG_ON((int)(async->munge_count - async->buf_write_count) > 0); 549 548 return num_bytes; 550 549 } 551 550 /* don't munge partial samples */ ··· 574 575 async->munge_ptr %= async->prealloc_bufsz; 575 576 count += block_size; 576 577 } 577 - if ((int)(async->munge_count - async->buf_write_count) > 0) 578 - BUG(); 578 + BUG_ON((int)(async->munge_count - async->buf_write_count) > 0); 579 579 return count; 580 580 } 581 581
+1 -2
drivers/staging/otus/wwrap.c
··· 350 350 buf->len = 0; 351 351 #endif 352 352 353 - if ((buf->tail + urb->actual_length) > buf->end) 354 - BUG(); 353 + BUG_ON((buf->tail + urb->actual_length) > buf->end); 355 354 356 355 skb_put(buf, urb->actual_length); 357 356
+1 -2
drivers/staging/usbip/vhci_sysfs.c
··· 31 31 char *s = out; 32 32 int i = 0; 33 33 34 - if (!the_controller || !out) 35 - BUG(); 34 + BUG_ON(!the_controller || !out); 36 35 37 36 spin_lock(&the_controller->lock); 38 37
+1 -2
drivers/staging/wlan-ng/hfa384x_usb.c
··· 3176 3176 goto exit; 3177 3177 3178 3178 skb = hw->rx_urb_skb; 3179 - if (!skb || (skb->data != urb->transfer_buffer)) 3180 - BUG(); 3179 + BUG_ON(!skb || (skb->data != urb->transfer_buffer)); 3181 3180 3182 3181 hw->rx_urb_skb = NULL; 3183 3182