Message ID | 156520029994.1268132.13388510714364773911.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d961a474be65c8195bb069c470b01f951bd2eb90 |
Headers | show |
Series | [ndctl] ndctl/lib: Fix duplicate bus detection | expand |
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 4d9cc7e29c6b..6596f94edef8 100644 --- a/ndctl/lib/libndctl.c +++ b/ndctl/lib/libndctl.c @@ -889,7 +889,9 @@ static void *add_bus(void *parent, int id, const char *ctl_base) ndctl_bus_foreach(ctx, bus_dup) if (strcmp(ndctl_bus_get_provider(bus_dup), - ndctl_bus_get_provider(bus)) == 0) { + ndctl_bus_get_provider(bus)) == 0 + && strcmp(ndctl_bus_get_devname(bus_dup), + ndctl_bus_get_devname(bus)) == 0) { free_bus(bus, NULL); free(path); return bus_dup;