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: 42d279f9 ("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.mountainSigned-off-by: Vinod Koul <vkoul@kernel.org>
Showing
Please register or sign in to comment