dundee: Fix error code handling in add_device()