Commit 7fecf0a1 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Do not dereference null pointer in twl4030 error path
  mfd: Always initialise WM831x IRQ mutex
parents 3242f980 a8643430
...@@ -795,7 +795,7 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -795,7 +795,7 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id)
twl->client = i2c_new_dummy(client->adapter, twl->client = i2c_new_dummy(client->adapter,
twl->address); twl->address);
if (!twl->client) { if (!twl->client) {
dev_err(&twl->client->dev, dev_err(&client->dev,
"can't attach client %d\n", i); "can't attach client %d\n", i);
status = -ENOMEM; status = -ENOMEM;
goto fail; goto fail;
......
...@@ -507,6 +507,8 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq) ...@@ -507,6 +507,8 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
{ {
int i, ret; int i, ret;
mutex_init(&wm831x->irq_lock);
if (!irq) { if (!irq) {
dev_warn(wm831x->dev, dev_warn(wm831x->dev,
"No interrupt specified - functionality limited\n"); "No interrupt specified - functionality limited\n");
...@@ -521,7 +523,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq) ...@@ -521,7 +523,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
} }
wm831x->irq = irq; wm831x->irq = irq;
mutex_init(&wm831x->irq_lock);
INIT_WORK(&wm831x->irq_work, wm831x_irq_worker); INIT_WORK(&wm831x->irq_work, wm831x_irq_worker);
/* Mask the individual interrupt sources */ /* Mask the individual interrupt sources */
......
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