xen/pvcalls-back: test for errors when calling backend_connect()
authorJuergen Gross <jgross@suse.com>
Mon, 11 May 2020 07:42:31 +0000 (09:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2020 14:43:04 +0000 (16:43 +0200)
commit63efec1f80bb5f112ffc7ae89faff86e067dbe42
tree32fc0359d700596c72e1a49af0a748eb0fa343a2
parentf8f2b599ea5210fa545634cb763ebc923187fab6
xen/pvcalls-back: test for errors when calling backend_connect()

commit c8d70a29d6bbc956013f3401f92a4431a9385a3c upstream.

backend_connect() can fail, so switch the device to connected only if
no error occurred.

Fixes: 0a9c75c2c7258f2 ("xen/pvcalls: xenbus state handling")
Cc: stable@vger.kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20200511074231.19794-1-jgross@suse.com
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/pvcalls-back.c