misc: ocxl: use put_device() instead of device_unregister()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 12 Mar 2018 11:36:53 +0000 (17:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 17:12:01 +0000 (18:12 +0100)
commit474cca5fd894de99afc69274e8b25524ae62d7ee
tree1ac5e0eb1ac393bc7a6e13457e9e2d9a2d906ff8
parent5fbe9f35dfcd83d94ec9bf4f68a9e0d7cc0550b5
misc: ocxl: use put_device() instead of device_unregister()

if device_register() returned an error! Always use put_device()
to give up the reference initialized.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ocxl/pci.c