Skip to content
Snippets Groups Projects
Commit 39614481 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-4.16a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fix from Juergen Gross:
 "Just one fix for the correct error handling after a failed
  device_register()"

* tag 'for-linus-4.16a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen: xenbus: use put_device() instead of kfree()
parents 4178802c 351b2bcc
No related branches found
No related tags found
No related merge requests found
...@@ -466,8 +466,11 @@ int xenbus_probe_node(struct xen_bus_type *bus, ...@@ -466,8 +466,11 @@ int xenbus_probe_node(struct xen_bus_type *bus,
/* Register with generic device framework. */ /* Register with generic device framework. */
err = device_register(&xendev->dev); err = device_register(&xendev->dev);
if (err) if (err) {
put_device(&xendev->dev);
xendev = NULL;
goto fail; goto fail;
}
return 0; return 0;
fail: fail:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment