Skip to content

Commit

Permalink
USB: BUG_ON conversion for wacom.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and Greg Kroah-Hartman committed Oct 17, 2006
1 parent 8d32e3a commit 2920349
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/input/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2920349

Please sign in to comment.