From 6a62b8766743ae430050f64409753874245fcf24 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 2 Jun 2012 09:58:02 -0700 Subject: [PATCH] --- yaml --- r: 315995 b: refs/heads/master c: 35bb95a17a1c04ec9620553867f29a336e868707 h: refs/heads/master i: 315993: 581a36be57cbc3e29264cd23a7ae4cbb4fb867d5 315991: b5ce63358180176098cc912f75501e9a41ed5511 v: v3 --- [refs] | 2 +- trunk/drivers/hwmon/asc7621.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index a3dac275622f..6cfbcc5b9d41 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5ff512b458ba7948d22dab0771233cf9b2da0793 +refs/heads/master: 35bb95a17a1c04ec9620553867f29a336e868707 diff --git a/trunk/drivers/hwmon/asc7621.c b/trunk/drivers/hwmon/asc7621.c index 7caa242915a6..b867aab78049 100644 --- a/trunk/drivers/hwmon/asc7621.c +++ b/trunk/drivers/hwmon/asc7621.c @@ -1109,7 +1109,8 @@ asc7621_probe(struct i2c_client *client, const struct i2c_device_id *id) if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return -EIO; - data = kzalloc(sizeof(struct asc7621_data), GFP_KERNEL); + data = devm_kzalloc(&client->dev, sizeof(struct asc7621_data), + GFP_KERNEL); if (data == NULL) return -ENOMEM; @@ -1143,7 +1144,6 @@ asc7621_probe(struct i2c_client *client, const struct i2c_device_id *id) &(asc7621_params[i].sda.dev_attr)); } - kfree(data); return err; } @@ -1192,7 +1192,6 @@ static int asc7621_remove(struct i2c_client *client) &(asc7621_params[i].sda.dev_attr)); } - kfree(data); return 0; }