Message ID | 1294300841.5622.59.camel@neuromancer (mailing list archive) |
---|---|
State | Accepted |
Commit | fd82be6c0a359fc706a805a49b1f167af21e63ea |
Delegated to: | Jiri Kosina |
Headers | show |
diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c index 1608c8d..2df87bb 100644 --- a/drivers/hid/hid-roccat-koneplus.c +++ b/drivers/hid/hid-roccat-koneplus.c @@ -256,6 +256,9 @@ static ssize_t koneplus_sysfs_read(struct file *fp, struct kobject *kobj, struct usb_device *usb_dev = interface_to_usbdev(to_usb_interface(dev)); int retval; + if (off >= real_size) + return 0; + if (off != 0 || count != real_size) return -EINVAL;