]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: use BUG_ON() instead of BUG()
authorGeyslan G. Bem <geyslan@gmail.com>
Wed, 2 Dec 2015 22:18:19 +0000 (19:18 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Dec 2015 16:25:58 +0000 (08:25 -0800)
Replace BUG() with BUG_ON().

Caught by coccinelle.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/oxu210hp-hcd.c

index 1f139d82cee08a92ccd0698201882d4be5d9d97c..bc74aca8a54c291a425a1e20d6e954c57a1296fb 100644 (file)
@@ -394,8 +394,7 @@ static void ehci_quiesce(struct oxu_hcd *oxu)
        u32     temp;
 
 #ifdef DEBUG
-       if (!HC_IS_RUNNING(oxu_to_hcd(oxu)->state))
-               BUG();
+       BUG_ON(!HC_IS_RUNNING(oxu_to_hcd(oxu)->state));
 #endif
 
        /* wait for any schedule enables/disables to take effect */
@@ -1709,9 +1708,8 @@ static void start_unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh)
 
 #ifdef DEBUG
        assert_spin_locked(&oxu->lock);
-       if (oxu->reclaim || (qh->qh_state != QH_STATE_LINKED
-                               && qh->qh_state != QH_STATE_UNLINK_WAIT))
-               BUG();
+       BUG_ON(oxu->reclaim || (qh->qh_state != QH_STATE_LINKED
+                               && qh->qh_state != QH_STATE_UNLINK_WAIT));
 #endif
 
        /* stop async schedule right now? */