diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-07-27 03:08:41 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-06 14:03:02 -0400 |
commit | cd7cf78e9bef269ed482ad8ab572f197ae89af3c (patch) | |
tree | 4e4658b40dac512930f74dcde854bb944c43096f /drivers/bluetooth | |
parent | 4f8d81584964730b08753da34f1e3fb7981cf742 (diff) |
Bluetooth: Use devm_kzalloc in dtl1_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>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 97a7784db4a2..036cb366fe6e 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -550,7 +550,7 @@ static int dtl1_probe(struct pcmcia_device *link) | |||
550 | dtl1_info_t *info; | 550 | dtl1_info_t *info; |
551 | 551 | ||
552 | /* Create new info device */ | 552 | /* Create new info device */ |
553 | info = kzalloc(sizeof(*info), GFP_KERNEL); | 553 | info = devm_kzalloc(&link->dev, sizeof(*info), GFP_KERNEL); |
554 | if (!info) | 554 | if (!info) |
555 | return -ENOMEM; | 555 | return -ENOMEM; |
556 | 556 | ||
@@ -569,7 +569,6 @@ static void dtl1_detach(struct pcmcia_device *link) | |||
569 | 569 | ||
570 | dtl1_close(info); | 570 | dtl1_close(info); |
571 | pcmcia_disable_device(link); | 571 | pcmcia_disable_device(link); |
572 | kfree(info); | ||
573 | } | 572 | } |
574 | 573 | ||
575 | static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data) | 574 | static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data) |