diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-09 16:54:18 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-09 16:54:18 -0800 |
commit | 39614481fb634d31c97f014b30866a80712e4446 (patch) | |
tree | fdd165ae79d6441fefeda0c50a9e841b39843042 /drivers/xen | |
parent | 4178802c771440322177718de57c9024fa5608e9 (diff) | |
parent | 351b2bccede1cb673ec7957b35ea997ea24c8884 (diff) | |
download | linux-39614481fb634d31c97f014b30866a80712e4446.tar.gz linux-39614481fb634d31c97f014b30866a80712e4446.tar.bz2 linux-39614481fb634d31c97f014b30866a80712e4446.zip |
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()
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 74888cacd0b0..ec9eb4fba59c 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -466,8 +466,11 @@ int xenbus_probe_node(struct xen_bus_type *bus, /* Register with generic device framework. */ err = device_register(&xendev->dev); - if (err) + if (err) { + put_device(&xendev->dev); + xendev = NULL; goto fail; + } return 0; fail: |