Tune handling of no-dev platforms

In case no devices are present, just skip getting the device IDs.
This ensure more consistent output (specifically, no-dev platforms
don't get stuck together with the following platform).
Also add a missing CHECK_ERROR when actually getting the IDs.