rio500: refuse more than one device at a time
PATCH 1/3 rio500: refuse more than one device at a time
This driver is using a global variable. It cannot handle more than one device at a time. The issue has been exisying since the dawn of the driver.
Signed-off-by Oliver Neukum <[email protected]>
Reported-by [email protected]
--- drivers/usb/misc/rio500.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/usb/misc/rio500.c +6 -1
@@ -449,7 +449,12 @@ static int probe_rio(struct usb_interface *intf,struct rio_usb_data *rio = &rio_instance;int retval; -dev_info (&intf->dev,"USB Rio found at address %d\n" , dev->devnum); +if (rio->present) { +dev_info (&intf->dev,"Second USB Rio at address %d refused\n" , dev->devnum); +return -EBUSY ; + }else { +dev_info (&intf->dev,"USB Rio found at address %d\n" , dev->devnum); + } retval =usb_register_dev (intf, &usb_rio_class);if (retval) {