am7xxx: comment on the loop termination in SCAN_OP_OPEN_DEVICE mode
authorAntonio Ospite <ao2@ao2.it>
Sun, 25 Jan 2015 22:23:33 +0000 (23:23 +0100)
committerAntonio Ospite <ao2@ao2.it>
Sun, 25 Jan 2015 22:23:33 +0000 (23:23 +0100)
src/am7xxx.c

index 006b216..3334615 100644 (file)
@@ -837,11 +837,12 @@ static int scan_devices(am7xxx_context *ctx, scan_op op,
                                                          open_device_index,
                                                          list[i],
                                                          dev);
                                                          open_device_index,
                                                          list[i],
                                                          dev);
-                                       if (ret < 0) {
+                                       if (ret < 0)
                                                debug(ctx, "open_device failed\n");
                                                debug(ctx, "open_device failed\n");
-                                               goto out;
-                                       }
 
 
+                                       /* exit the loop unconditionally after
+                                        * attempting to open the device
+                                        * requested by the user */
                                        goto out;
                                }
                                current_index++;
                                        goto out;
                                }
                                current_index++;