The following commit has been merged in the batman-adv/next branch: commit 4f61cb184fd5d16d591303aacf8dd1e623d2137d Author: Sachin Kamat sachin.kamat@linaro.org Date: Fri Jul 27 12:38:35 2012 +0530
Bluetooth: Use devm_kzalloc in bt3c_cs.c file
devm_kzalloc() eliminates the need to free memory explicitly thereby saving some cleanup code.
Signed-off-by: Sachin Kamat sachin.kamat@linaro.org Acked-by: Marcel Holtmann marcel@holtmann.org Signed-off-by: Gustavo Padovan gustavo.padovan@collabora.co.uk
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 8925b6d..7ffd3f4 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c @@ -638,7 +638,7 @@ static int bt3c_probe(struct pcmcia_device *link) bt3c_info_t *info;
/* Create new info device */ - info = kzalloc(sizeof(*info), GFP_KERNEL); + info = devm_kzalloc(&link->dev, sizeof(*info), GFP_KERNEL); if (!info) return -ENOMEM;
@@ -654,10 +654,7 @@ static int bt3c_probe(struct pcmcia_device *link)
static void bt3c_detach(struct pcmcia_device *link) { - bt3c_info_t *info = link->priv; - bt3c_release(link); - kfree(info); }
static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data)