Skip to content

Commit

Permalink
mfd: Do not dereference null pointer in twl4030 error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilkka Koskinen authored and Samuel Ortiz committed Oct 26, 2009
1 parent 14f572f commit a864343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/twl4030-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a864343

Please sign in to comment.