提交 6a7255e1 编写于 作者: S Sean Young 提交者: Greg Kroah-Hartman

USB: Fix oops in PhidgetServo

The PhidgetServo causes an Oops when any of its sysfs attributes are read
or written too, making the driver useless.
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f2380854
...@@ -282,6 +282,7 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id) ...@@ -282,6 +282,7 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
dev->dev = NULL; dev->dev = NULL;
goto out; goto out;
} }
dev_set_drvdata(dev->dev, dev);
servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1; servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册