diff mbox

[Resend,1/2] twl4030: Do not dereference null pointer in error path

Message ID 1256044973-14548-1-git-send-email-ilkka.koskinen@nokia.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Ilkka Koskinen Oct. 20, 2009, 1:22 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c
index e424cf6..8cf0a02 100644
--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -792,7 +792,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;