Reformat nodeStateCleanup

Remove the ret variable and return early if there is no driver.
This commit is contained in:
Ján Tomko 2016-06-03 12:38:40 +02:00
parent 5c88b34afa
commit d85e29dd82
1 changed files with 21 additions and 25 deletions

View File

@ -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;
}