diff options
Diffstat (limited to 'lib/libzfs/libzfs_util.c')
-rw-r--r-- | lib/libzfs/libzfs_util.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index ee8d09b11..6b9cfc272 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -965,13 +965,14 @@ libzfs_load_module(const char *module) load = 0; } - if (load && libzfs_run_process("/sbin/modprobe", argv, 0)) - return (ENOEXEC); - } + if (load) { + if (libzfs_run_process("/sbin/modprobe", argv, 0)) + return (ENOEXEC); - /* Module loading is synchronous it must be available */ - if (!libzfs_module_loaded(module)) - return (ENXIO); + if (!libzfs_module_loaded(module)) + return (ENXIO); + } + } /* * Device creation by udev is asynchronous and waiting may be |