diff options
| -rw-r--r-- | drivers/usb/storage/transport.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 9b22b2acb40c..8c3baaabfb02 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -344,6 +344,12 @@ unsigned int usb_stor_transfer_length(Scsi_Cmnd *srb) len = srb->request_bufflen; } + /* According to the linux-scsi people, any command sent which + * violates this invariant is a bug. In the hopes of removing + * all the complex logic above, let's find them and eliminate them. + */ + BUG_ON(len != srb->request_bufflen); + return len; } |
