diff options
author | Ilkka Koskinen <ilkka.koskinen@nokia.com> | 2009-10-20 09:22:52 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2009-10-26 19:20:33 -0400 |
commit | a8643430bc82aa3d272b21df2e1feb502bb8aacb (patch) | |
tree | 5d36ab9a0b1b84414cd3e9327be319e493acebec /drivers/mfd | |
parent | 14f572fa38c55fbe369127b808a4a79b0bbec367 (diff) |
mfd: Do not dereference null pointer in twl4030 error path
We are mistakenly dereferencing twl->client in the twl->client null checking
path.
Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/twl4030-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c index e832e975da60..a1c47ee95c0e 100644 --- a/drivers/mfd/twl4030-core.c +++ b/drivers/mfd/twl4030-core.c | |||
@@ -795,7 +795,7 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
795 | twl->client = i2c_new_dummy(client->adapter, | 795 | twl->client = i2c_new_dummy(client->adapter, |
796 | twl->address); | 796 | twl->address); |
797 | if (!twl->client) { | 797 | if (!twl->client) { |
798 | dev_err(&twl->client->dev, | 798 | dev_err(&client->dev, |
799 | "can't attach client %d\n", i); | 799 | "can't attach client %d\n", i); |
800 | status = -ENOMEM; | 800 | status = -ENOMEM; |
801 | goto fail; | 801 | goto fail; |