patch-2.3.11 linux/drivers/usb/keyboard.c
Next file: linux/drivers/usb/mouse.c
Previous file: linux/drivers/usb/hub.h
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Mon Jul 19 11:17:32 1999
- Orig file:
v2.3.10/linux/drivers/usb/keyboard.c
- Orig date:
Sun Jun 20 18:51:52 1999
diff -u --recursive --new-file v2.3.10/linux/drivers/usb/keyboard.c linux/drivers/usb/keyboard.c
@@ -195,7 +195,10 @@
kbd->dev = dev;
dev->private = kbd;
- usb_set_configuration(dev, dev->config[0].bConfigurationValue);
+ if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
+ printk (KERN_INFO " Failed usb_set_configuration: kbd\n");
+ goto probe_err;
+ }
usb_set_protocol(dev, 0);
usb_set_idle(dev, 0, 0);
@@ -206,9 +209,14 @@
kbd);
list_add(&kbd->list, &usb_kbd_list);
+
+ return 0;
}
- return 0;
+probe_err:
+ if (kbd)
+ kfree (kbd);
+ return -1;
}
static void
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)