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

[PATCH] err2-25: dvb_register_i2c_bus() locking fix

Found by the Stanford locking checker.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 34969104
......@@ -191,8 +191,10 @@ dvb_register_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
if (down_interruptible (&dvb_i2c_mutex))
return NULL;
if (!(i2c = kmalloc (sizeof (struct dvb_i2c_bus), GFP_KERNEL)))
if (!(i2c = kmalloc (sizeof (struct dvb_i2c_bus), GFP_KERNEL))) {
up (&dvb_i2c_mutex);
return NULL;
}
INIT_LIST_HEAD(&i2c->list_head);
INIT_LIST_HEAD(&i2c->client_list);
......
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