Commit 34969104 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] err2-1 dvb_register_i2c_device locking fix

Fix deadlock identified by the Stanford locking checker.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bec7fcac
......@@ -239,8 +239,10 @@ int dvb_register_i2c_device (struct module *owner,
if (down_interruptible (&dvb_i2c_mutex))
return -ERESTARTSYS;
if (!(entry = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL)))
if (!(entry = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL))) {
up(&dvb_i2c_mutex);
return -ENOMEM;
}
entry->owner = owner;
entry->attach = attach;
......
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