提交 dc56ad9b 编写于 作者: A Alan Jenkins 提交者: Len Brown

eeepc-laptop: fix potential leak (led_init() failure)

If we bail out because we can't create the led class device, we need to
ensure the led workqueue is cleaned up.
Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 2b56f1c1
......@@ -1248,8 +1248,10 @@ static int eeepc_led_init(struct device *dev)
return -ENOMEM;
rv = led_classdev_register(dev, &tpd_led);
if (rv)
if (rv) {
destroy_workqueue(led_workqueue);
return rv;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册