mirror of https://gitee.com/openkylin/libvirt.git
Reformat nodeStateCleanup
Remove the ret variable and return early if there is no driver.
This commit is contained in:
parent
5c88b34afa
commit
d85e29dd82
|
@ -1488,13 +1488,13 @@ static void udevPCITranslateDeinit(void)
|
|||
|
||||
static int nodeStateCleanup(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
udevPrivate *priv = NULL;
|
||||
struct udev_monitor *udev_monitor = NULL;
|
||||
struct udev *udev = NULL;
|
||||
|
||||
if (driver) {
|
||||
if (!driver)
|
||||
return -1;
|
||||
|
||||
nodeDeviceLock();
|
||||
|
||||
priv = driver->privateData;
|
||||
|
@ -1519,11 +1519,7 @@ static int nodeStateCleanup(void)
|
|||
VIR_FREE(priv);
|
||||
|
||||
udevPCITranslateDeinit();
|
||||
} else {
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue