Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2920349d authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Greg Kroah-Hartman
Browse files

USB: BUG_ON conversion for wacom.c



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: default avatarEric Sesterhenn <snakebyte@gmx.de>
Acked-by: default avatar"Ping Cheng" <pingc@wacom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8d32e3ae
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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));
	strlcat(wacom->phys, "/input0", sizeof(wacom->phys));


	wacom_wac->features = get_wacom_feature(id);
	wacom_wac->features = get_wacom_feature(id);
	if (wacom_wac->features->pktlen > 10)
	BUG_ON(wacom_wac->features->pktlen > 10);
		BUG();


	input_dev->name = wacom_wac->features->name;
	input_dev->name = wacom_wac->features->name;
	wacom->wacom_wac = wacom_wac;
	wacom->wacom_wac = wacom_wac;