mfd: Remove incorrect wm8350 kfree
authorRabin Vincent <rabin@rab.in>
Wed, 21 Apr 2010 15:36:05 +0000 (21:06 +0530)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 27 May 2010 23:37:41 +0000 (01:37 +0200)
The i2c_client received in probe() should not be kfree()'d.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm8350-i2c.c

index aa3ba09..7795af4 100644 (file)
@@ -64,10 +64,8 @@ static int wm8350_i2c_probe(struct i2c_client *i2c,
        int ret = 0;
 
        wm8350 = kzalloc(sizeof(struct wm8350), GFP_KERNEL);
-       if (wm8350 == NULL) {
-               kfree(i2c);
+       if (wm8350 == NULL)
                return -ENOMEM;
-       }
 
        i2c_set_clientdata(i2c, wm8350);
        wm8350->dev = &i2c->dev;