Commit e29852f8 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: locking fix for pid.c

you forgot to drop a spinlock before you report an error. A deadlock
will occur.
parent c3ca41be
......@@ -200,6 +200,7 @@ static int hid_pid_upload_effect(struct input_dev *dev,
break;
if ( id == FF_EFFECTS_MAX) {
spin_unlock_irqrestore(&pid_private->lock,flags);
// TEMP - We need to get ff_effects_max correctly first: || id >= dev->ff_effects_max) {
dev_dbg(&pid_private->hid->dev->dev, "Not enough device memory\n");
return -ENOMEM;
......
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