···426426 /*427427 * fill in all the output members428428 */429429- hdr->device_status = status_byte(rq->errors);429429+ hdr->device_status = rq->errors & 0xff;430430 hdr->transport_status = host_byte(rq->errors);431431 hdr->driver_status = driver_byte(rq->errors);432432 hdr->info = 0;
+2-2
drivers/scsi/scsi.c
···1046104610471047 /* If the user actually wanted this page, we can skip the rest */10481048 if (page == 0)10491049- return -EINVAL;10491049+ return 0;1050105010511051 for (i = 0; i < min((int)buf[3], buf_len - 4); i++)10521052 if (buf[i + 4] == page)10531053 goto found;1054105410551055- if (i < buf[3] && i > buf_len)10551055+ if (i < buf[3] && i >= buf_len - 4)10561056 /* ran off the end of the buffer, give us benefit of doubt */10571057 goto found;10581058 /* The device claims it doesn't support the requested page */