diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-07-27 09:08:33 +0200 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-06 20:03:00 +0200 |
commit | 1a31c602c3f6de9383eaae28e25859b6304fc3c2 (patch) | |
tree | ef9be4841f06e885e4f0c3c7092c27ef8f8f3e46 /drivers/bluetooth | |
parent | Bluetooth: Use devm_kzalloc in bfusb.c file (diff) | |
download | linux-1a31c602c3f6de9383eaae28e25859b6304fc3c2.tar.xz linux-1a31c602c3f6de9383eaae28e25859b6304fc3c2.zip |
Bluetooth: Use devm_kzalloc in bluecard_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/bluecard_cs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 66c3a6770c41..0c0838d9b56c 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c @@ -849,7 +849,7 @@ static int bluecard_probe(struct pcmcia_device *link) bluecard_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; @@ -864,10 +864,7 @@ static int bluecard_probe(struct pcmcia_device *link) static void bluecard_detach(struct pcmcia_device *link) { - bluecard_info_t *info = link->priv; - bluecard_release(link); - kfree(info); } |