diff --git a/serialport.c b/serialport.c index b47ddd9..7022a9d 100644 --- a/serialport.c +++ b/serialport.c @@ -205,7 +205,7 @@ out_done: CFDictionarySetValue(classes, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); - if (!(IOServiceGetMatchingServices(master, classes, &iter))) + if (IOServiceGetMatchingServices(master, classes, &iter) != KERN_SUCCESS) { ret = SP_ERR_FAIL; goto out_done;