Hi, trancevibrator should not pretend success if it returns an error.
Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]> Regards Oliver ---- --- linux-2.6.24-ser/drivers/usb/misc/trancevibrator.c.alt 2008-01-30 15:56:49.000000000 +0100 +++ linux-2.6.24-ser/drivers/usb/misc/trancevibrator.c 2008-01-30 15:56:58.000000000 +0100 @@ -59,13 +59,14 @@ static ssize_t set_speed(struct device * { struct usb_interface *intf = to_usb_interface(dev); struct trancevibrator *tv = usb_get_intfdata(intf); - int temp, retval; + int temp, retval, old; temp = simple_strtoul(buf, NULL, 10); if (temp > 255) temp = 255; else if (temp < 0) temp = 0; + old = tv->speed; tv->speed = temp; dev_dbg(&tv->udev->dev, "speed = %d\n", tv->speed); @@ -77,6 +78,7 @@ static ssize_t set_speed(struct device * tv->speed, /* speed value */ 0, NULL, 0, USB_CTRL_GET_TIMEOUT); if (retval) { + tv->speed = old; dev_dbg(&tv->udev->dev, "retval = %d\n", retval); return retval; } - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html