diff options
author | Andi Shyti <andi@etezian.org> | 2013-06-14 12:46:29 +0200 |
---|---|---|
committer | Andi Shyti <andi@etezian.org> | 2013-06-14 12:46:29 +0200 |
commit | ec033a1df8b7516b88fc60fb4d6b5b8e852e74e3 (patch) | |
tree | bcf95cdca7772839aca699b141555912e7d9f17a /etzkx.c | |
parent | 6b0533e8a27a006c8e442c438a724862635e6285 (diff) |
etzkx.c: use devm_kzalloc instead of kzalloc
Signed-off-by: Andi Shyti <andi@etezian.org>
Diffstat (limited to 'etzkx.c')
-rw-r--r-- | etzkx.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2063,7 +2063,7 @@ static int __devinit etzkx_probe(struct i2c_client *client, return -ENODEV; } - sdata = kzalloc(sizeof(struct etzkx_data), GFP_KERNEL); + sdata = devm_kzalloc(sizeof(struct etzkx_data), GFP_KERNEL); if (!sdata) { dev_err(&client->dev, "no memory available\n"); return -ENOMEM; @@ -2208,7 +2208,6 @@ free_src: sdata->pdata->release(); free_stmt: mutex_unlock(&sdata->mutex); - kfree(sdata); return err; } @@ -2238,8 +2237,6 @@ static int __devexit etzkx_remove(struct i2c_client *client) if (sdata->pdata->release) sdata->pdata->release(); - kfree(sdata); - return 0; } |