aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/wm8994-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index 69533f5ab03e..b3b2aaf89dbe 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -497,10 +497,8 @@ static int wm8994_i2c_probe(struct i2c_client *i2c,
497 struct wm8994 *wm8994; 497 struct wm8994 *wm8994;
498 498
499 wm8994 = kzalloc(sizeof(struct wm8994), GFP_KERNEL); 499 wm8994 = kzalloc(sizeof(struct wm8994), GFP_KERNEL);
500 if (wm8994 == NULL) { 500 if (wm8994 == NULL)
501 kfree(i2c);
502 return -ENOMEM; 501 return -ENOMEM;
503 }
504 502
505 i2c_set_clientdata(i2c, wm8994); 503 i2c_set_clientdata(i2c, wm8994);
506 wm8994->dev = &i2c->dev; 504 wm8994->dev = &i2c->dev;