]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/mfd/wl1273-core.c
Merge tag 'mmc-updates-for-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-artful-kernel.git] / drivers / mfd / wl1273-core.c
index 1288e9943f010d26d7b647f4a099c82cc22c8b34..f7c52d901040cc5b14f00ebb86a8678ee7918e6d 100644 (file)
@@ -172,12 +172,9 @@ static int wl1273_fm_set_volume(struct wl1273_core *core, unsigned int volume)
 
 static int wl1273_core_remove(struct i2c_client *client)
 {
-       struct wl1273_core *core = i2c_get_clientdata(client);
-
        dev_dbg(&client->dev, "%s\n", __func__);
 
        mfd_remove_devices(&client->dev);
-       kfree(core);
 
        return 0;
 }
@@ -203,7 +200,7 @@ static int wl1273_core_probe(struct i2c_client *client,
                return -EINVAL;
        }
 
-       core = kzalloc(sizeof(*core), GFP_KERNEL);
+       core = devm_kzalloc(&client->dev, sizeof(*core), GFP_KERNEL);
        if (!core)
                return -ENOMEM;
 
@@ -249,7 +246,6 @@ static int wl1273_core_probe(struct i2c_client *client,
 
 err:
        pdata->free_resources();
-       kfree(core);
 
        dev_dbg(&client->dev, "%s\n", __func__);