diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-03-07 00:00:31 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-11 08:11:18 +0100 |
commit | 3a6cefb53b53af0ce6d4d674c2dea8b82342b204 (patch) | |
tree | bfc06022539b6efa5ce7909c603c24922f9c4405 /drivers/mfd | |
parent | 9bb76f450fb773d87c6fef1cab4549046093f3dd (diff) | |
download | barebox-3a6cefb53b53af0ce6d4d674c2dea8b82342b204.tar.gz barebox-3a6cefb53b53af0ce6d4d674c2dea8b82342b204.tar.xz |
usb: storage: Drop unnecessary check in usb_stor_blk_io()
Checking that sector_count is zero, shouldn't be necessary since block
layer won't call this function if there's no data to be read. Drop it.
Checking that blockbits is eqal to SECTOR_SHIFT isn't necessary, since
that field is filled by the driver and is not changed outsied of
it. We know it is going to be SECTOR_SHIFT. Drop it.
Checking sector_start > (ulong)-1 doesn't make sense at all since
sector start is 'int' and it can't possibly be greater that
ULONG_MAX. Drop it.
Checking for sector_start >= pblk_dev->blk.num_blocks isn't necessary
either, since we shouldn't receive request for invalid read from block
layer. Drop it.
Ditto for sector_count > INT_MAX and sector_start + sector_count >
pblk_dev->blk.num_blocks.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mfd')
0 files changed, 0 insertions, 0 deletions