USB: BUG_ON conversion for wacom.c
authorEric Sesterhenn <[mailto:snakebyte@gmx.de]>
Tue, 17 Oct 2006 21:46:30 +0000 (14:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Oct 2006 21:46:30 +0000 (14:46 -0700)
this patch converts two if () BUG(); construct to BUG_ON();
which occupies less space, uses unlikely and is safer when
BUG() is disabled.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: "Ping Cheng" <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/input/wacom_sys.c

index 3c27f9b..31379b8 100644 (file)
@@ -223,8 +223,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
        strlcat(wacom->phys, "/input0", sizeof(wacom->phys));
 
        wacom_wac->features = get_wacom_feature(id);
-       if (wacom_wac->features->pktlen > 10)
-               BUG();
+       BUG_ON(wacom_wac->features->pktlen > 10);
 
        input_dev->name = wacom_wac->features->name;
        wacom->wacom_wac = wacom_wac;