Browse Source

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>
Ilkka Koskinen 15 years ago
parent
commit
a8643430bc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mfd/twl4030-core.c

+ 1 - 1
drivers/mfd/twl4030-core.c

@@ -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;