HID: Return ENODEV instead of B_ERROR if the device was removed.
This should help with diagnosing problems in some failure conditions.
This commit is contained in:
parent
42c53fc8b8
commit
d98fcb7db6
@ -163,7 +163,7 @@ status_t
|
||||
HIDDevice::MaybeScheduleTransfer(HIDReport *report)
|
||||
{
|
||||
if (fRemoved)
|
||||
return B_ERROR;
|
||||
return ENODEV;
|
||||
|
||||
if (atomic_get_and_set(&fTransferScheduled, 1) != 0) {
|
||||
// someone else already caused a transfer to be scheduled
|
||||
|
@ -266,7 +266,7 @@ status_t
|
||||
HIDDevice::MaybeScheduleTransfer(HIDReport*)
|
||||
{
|
||||
if (fRemoved)
|
||||
return B_ERROR;
|
||||
return ENODEV;
|
||||
|
||||
if (atomic_get_and_set(&fTransferScheduled, 1) != 0) {
|
||||
// someone else already caused a transfer to be scheduled
|
||||
|
Loading…
Reference in New Issue
Block a user