Only a negative return value from udev_enumerate_add_match_subsystem()
indicates an error.
Fixes: 7b47762 ("libmultipath: nvme: fix path detection for kernel 4.16")
Signed-off-by: Martin Wilck <[email protected]>
---
libmultipath/foreign/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c
index 0d19303..4cbdf60 100644
--- a/libmultipath/foreign/nvme.c
+++ b/libmultipath/foreign/nvme.c
@@ -536,7 +536,7 @@ struct udev_device *get_ctrl_blkdev(const struct context
*ctx,
pthread_cleanup_push(_udev_enumerate_unref, enm);
if (udev_enumerate_add_match_parent(enm, ctrl) < 0)
goto out;
- if (udev_enumerate_add_match_subsystem(enm, "block"))
+ if (udev_enumerate_add_match_subsystem(enm, "block") < 0)
goto out;
if (udev_enumerate_scan_devices(enm) < 0) {
--
2.51.0