[PATCH v2] sparc: fix error handling in scan_one_device()