VMCI: Fix some error handling paths in vmci_guest_probe_device()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 24 Feb 2022 20:22:37 +0000 (21:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Feb 2022 10:55:01 +0000 (11:55 +0100)
commit77e861619baea5a7c934e47fda74b03c0b072aec
tree28014acea236be5a27638ceaa9c456c573c2d8d6
parentcc312da2d3af87f183c57b672042c85cfe6f15c2
VMCI: Fix some error handling paths in vmci_guest_probe_device()

The 'err_remove_vmci_dev_g' error label is not at the right place.
This could lead to un-released resource.

There is also a missing label. If pci_alloc_irq_vectors() fails, the
previous vmci_event_subscribe() call must be undone.

Acked-by: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/959218ce3b135197946d85cd9453551cd04fa5da.1645734041.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_vmci/vmci_guest.c