don't OR integer error values together as this does not make sense.

Instead bail on the first failed command.
This commit is contained in:
n_hibma 2014-08-05 11:50:16 +00:00
parent 3ac98abb89
commit 8ed602ddab

View File

@ -754,7 +754,8 @@ u3g_test_autoinst(void *arg, struct usb_device *udev,
break;
case U3GINIT_ZTESTOR:
error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT);
error |= usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR);
if (error == 0)
error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR);
break;
case U3GINIT_CMOTECH:
error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH);