summaryrefslogtreecommitdiff
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
authorLiu Jian <liujian56@huawei.com>2020-07-20 22:33:15 +0800
committerStefan Schmidt <stefan@datenfreihafen.org>2020-07-21 10:31:33 +0200
commit88f46b3fe2ac41c381770ebad9f2ee49346b57a2 (patch)
treeab293116e54ced5461186bbb0c1066193573f3b3 /drivers/net/ieee802154
parent6ef9dcb78046b346b5508ca1659848b136a343c2 (diff)
downloadlwn-88f46b3fe2ac41c381770ebad9f2ee49346b57a2.tar.gz
lwn-88f46b3fe2ac41c381770ebad9f2ee49346b57a2.zip
ieee802154: fix one possible memleak in ca8210_dev_com_init
We should call destroy_workqueue to destroy mlme_workqueue in error branch. Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") Signed-off-by: Liu Jian <liujian56@huawei.com> Link: https://lore.kernel.org/r/20200720143315.40523-1-liujian56@huawei.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/ca8210.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index e04c3b60cae7..4eb64709d44c 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -2925,6 +2925,7 @@ static int ca8210_dev_com_init(struct ca8210_priv *priv)
);
if (!priv->irq_workqueue) {
dev_crit(&priv->spi->dev, "alloc of irq_workqueue failed!\n");
+ destroy_workqueue(priv->mlme_workqueue);
return -ENOMEM;
}