linux: Move check for a device being added twice to linux_enumerate_device

It is possible for a device to show up between the hotplug code starting to
listen for new devices, and the enumeration of existing devices. This will
cause a device to get enumerated twice.

The next patch in this series adds a different code path which can cause
a device to be enumerated twice, this patch therefor moves the check for
this to linux_enumerate_device, so that this will get caught in all cases.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 files changed