uas: Fix / cleanup usb_uas_task error handling
commit5eb6d9e3ef1fac096ab5b3f5c14e1f4079dd7367
authorHans de Goede <hdegoede@redhat.com>
Thu, 24 Oct 2013 17:15:51 +0000 (24 18:15 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 26 Nov 2013 08:21:17 +0000 (26 09:21 +0100)
tree44c83b26a54ca287aca977b51c163df5dea04f65
parentd4bfc7b9f35da7dcc28ae87de503b28bd7ff56ee
uas: Fix / cleanup usb_uas_task error handling

-The correct error if we cannot find the dev is INCORRECT_LUN rather then
 INVALID_INFO_UNIT
-Move the device not found check to the top so we only need to do it once
-Remove the dev->lun != lun checks, dev is returned by scsi_device_find
 which searches by lun, so this will never trigger

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-uas.c