Use or instead of and to determine if urb is valid

This commit is contained in:
Jacob Adams 2015-02-01 22:56:49 -05:00
parent 82d8277600
commit 8a3135083f

View File

@ -329,7 +329,7 @@ static void submit_urb(message *msg)
DEBUG_MSG("URB type: %d", mx_urb->type);
/* 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.");
res = EINVAL;
goto out;