1
0
Fork 0

ieee802154: fix one possible memleak in ca8210_dev_com_init

[ Upstream commit 88f46b3fe2 ]

We should call destroy_workqueue to destroy mlme_workqueue in error branch.

Fixes: ded845a781 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Liu Jian 2020-07-20 22:33:15 +08:00 committed by Greg Kroah-Hartman
parent d85044145f
commit 22936fa7a2
1 changed files with 1 additions and 0 deletions

View File

@ -2924,6 +2924,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;
}