mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
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
This commit is contained in:
commit
7fecf0a1f2
@ -795,7 +795,7 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
twl->client = i2c_new_dummy(client->adapter,
|
||||
twl->address);
|
||||
if (!twl->client) {
|
||||
dev_err(&twl->client->dev,
|
||||
dev_err(&client->dev,
|
||||
"can't attach client %d\n", i);
|
||||
status = -ENOMEM;
|
||||
goto fail;
|
||||
|
@ -507,6 +507,8 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
|
||||
{
|
||||
int i, ret;
|
||||
|
||||
mutex_init(&wm831x->irq_lock);
|
||||
|
||||
if (!irq) {
|
||||
dev_warn(wm831x->dev,
|
||||
"No interrupt specified - functionality limited\n");
|
||||
@ -521,7 +523,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
|
||||
}
|
||||
|
||||
wm831x->irq = irq;
|
||||
mutex_init(&wm831x->irq_lock);
|
||||
INIT_WORK(&wm831x->irq_work, wm831x_irq_worker);
|
||||
|
||||
/* Mask the individual interrupt sources */
|
||||
|
Loading…
x
Reference in New Issue
Block a user