Skip to content
Snippets Groups Projects
Commit 72ac8f3f authored by Bin Meng's avatar Bin Meng Committed by Marek Vasut
Browse files

usb: storage: Fix overwritten in usb_stor_set_max_xfer_blk()


The stored 'blk' value is overwritten to 'size / 512' before it can
be used in usb_stor_set_max_xfer_blk(). This is not what we want.
In fact, when 'size' exceeds the upper limit (USHRT_MAX * 512), we
should simply assign 'size' to the upper limit.

Reported-by: Coverity (CID: 167250)
Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent fae35857
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment