mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 02:04:05 +08:00
xen/pvcalls-back: test for errors when calling backend_connect()
backend_connect() can fail, so switch the device to connected only if
no error occurred.
Fixes: 0a9c75c2c7
("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>
This commit is contained in:
parent
b9bbe6ed63
commit
c8d70a29d6
@ -1088,7 +1088,8 @@ static void set_backend_state(struct xenbus_device *dev,
|
||||
case XenbusStateInitialised:
|
||||
switch (state) {
|
||||
case XenbusStateConnected:
|
||||
backend_connect(dev);
|
||||
if (backend_connect(dev))
|
||||
return;
|
||||
xenbus_switch_state(dev, XenbusStateConnected);
|
||||
break;
|
||||
case XenbusStateClosing:
|
||||
|
Loading…
Reference in New Issue
Block a user