This fixes a potentially undefined branch if the USB device list is empty. dev is NULL, the loop is never entered, 'r' isn't set. if (!dev && !r) is undefined.
This fixes a potentially undefined branch if the USB device list is empty. dev is NULL, the loop is never entered, 'r' isn't set. if (!dev && !r) is undefined.