diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 3b4715a240..f08255ea0e 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2644,8 +2644,10 @@ static virStateDriver stateDriver = { .stateReload = storageStateReload, }; -int storageRegister(void) { - virRegisterStorageDriver(&storageDriver); +int storageRegister(void) +{ + if (virRegisterStorageDriver(&storageDriver) < 0) + return -1; virRegisterStateDriver(&stateDriver); return 0; }