]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
dmaengine: idxd: Fix error handling in idxd_wq_cdev_dev_setup()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 5 Feb 2020 12:32:48 +0000 (15:32 +0300)
committerVinod Koul <vkoul@kernel.org>
Thu, 13 Feb 2020 15:07:23 +0000 (20:37 +0530)
commit2227ab4216cd4d56619733bcfaee7e6943cdc9aa
tree2959547d3aca5e11664e9112bf3d24a74577a0da
parent83c49f734463980802d6dba376f69e787fb07a8e
dmaengine: idxd: Fix error handling in idxd_wq_cdev_dev_setup()

We can't call kfree(dev) after calling device_register(dev).  The "dev"
pointer has to be freed using put_device().

Fixes: 42d279f9137a ("dmaengine: idxd: add char driver to expose submission portal to userland")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20200205123248.hmtog7qa2eiqaagh@kili.mountain
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/cdev.c