Use or instead of and to determine if urb is valid

close #24

Change-Id: I12e2b20d69aa7b186a8e5cd0dc16f653a18b2ee2
This commit is contained in:
Jacob Adams 2015-02-01 22:56:49 -05:00 committed by Lionel Sambuc
parent 7171c2321f
commit dc0077241b

View file

@ -329,7 +329,7 @@ static void submit_urb(message *msg)
DEBUG_MSG("URB type: %d", mx_urb->type); DEBUG_MSG("URB type: %d", mx_urb->type);
/* check if urb is valid */ /* check if urb is valid */
if (mx_urb->dev_id >= MAX_DEVS && mx_urb->dev_id < 0) { if (mx_urb->dev_id >= MAX_DEVS || mx_urb->dev_id < 0) {
DEBUG_MSG("Bogus device ID."); DEBUG_MSG("Bogus device ID.");
res = EINVAL; res = EINVAL;
goto out; goto out;