aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btuart_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/btuart_cs.c')
-rw-r--r--drivers/bluetooth/btuart_cs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 21e803a6a281..2f510a87b28f 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -567,7 +567,7 @@ static int btuart_probe(struct pcmcia_device *link)
567 btuart_info_t *info; 567 btuart_info_t *info;
568 568
569 /* Create new info device */ 569 /* Create new info device */
570 info = kzalloc(sizeof(*info), GFP_KERNEL); 570 info = devm_kzalloc(&link->dev, sizeof(*info), GFP_KERNEL);
571 if (!info) 571 if (!info)
572 return -ENOMEM; 572 return -ENOMEM;
573 573
@@ -583,10 +583,7 @@ static int btuart_probe(struct pcmcia_device *link)
583 583
584static void btuart_detach(struct pcmcia_device *link) 584static void btuart_detach(struct pcmcia_device *link)
585{ 585{
586 btuart_info_t *info = link->priv;
587
588 btuart_release(link); 586 btuart_release(link);
589 kfree(info);
590} 587}
591 588
592static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data) 589static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data)