提交 ee656e9d 编写于 作者: S Samuel Ortiz

NFC: Remove and free all SEs when releasing an NFC device

Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 2757c372
......@@ -820,11 +820,19 @@ EXPORT_SYMBOL(nfc_remove_se);
static void nfc_release(struct device *d)
{
struct nfc_dev *dev = to_nfc_dev(d);
struct nfc_se *se, *n;
pr_debug("dev_name=%s\n", dev_name(&dev->dev));
nfc_genl_data_exit(&dev->genl_data);
kfree(dev->targets);
list_for_each_entry_safe(se, n, &dev->secure_elements, list) {
nfc_genl_se_removed(dev, se->idx);
list_del(&se->list);
kfree(se);
}
kfree(dev);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册