Commit acf2ffb0 authored by Dmitry Torokhov's avatar Dmitry Torokhov

serio.c:

  claim serio early in serio_open()
parent af316dea
...@@ -229,9 +229,11 @@ void serio_unregister_device(struct serio_dev *dev) ...@@ -229,9 +229,11 @@ void serio_unregister_device(struct serio_dev *dev)
/* called from serio_dev->connect/disconnect methods under serio_sem */ /* called from serio_dev->connect/disconnect methods under serio_sem */
int serio_open(struct serio *serio, struct serio_dev *dev) int serio_open(struct serio *serio, struct serio_dev *dev)
{ {
if (serio->open(serio))
return -1;
serio->dev = dev; serio->dev = dev;
if (serio->open(serio)) {
serio->dev = NULL;
return -1;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment