]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Remove duplicate ida_free in iommu_group_alloc
authorYuan Can <yuancan@huawei.com>
Mon, 15 Aug 2022 03:14:23 +0000 (03:14 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 7 Sep 2022 08:52:47 +0000 (10:52 +0200)
commita7dc48c5928356fad4976f66f18b7386cb66a707
tree526193d61ec7f0adbdaf8b8467ab015c53d49667
parent0bf1a6a1a8725dd88bcc02d7dd18a2cae30e3813
iommu: Remove duplicate ida_free in iommu_group_alloc

In the iommu_group_alloc, when the kobject_init_and_add
failed, the group->kobj is associate with iommu_group_ktype,
thus its release function iommu_group_release will be called
by the following kobject_put. The iommu_group_release calls
ida_free with the group->id, so we do not need to do it before
kobject_put.

Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20220815031423.94548-1-yuancan@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c