Skip to content
Commit 4850f26a authored by Daniel M German's avatar Daniel M German Committed by Greg Kroah-Hartman
Browse files

usb: clean up some of the computations in adu_read



Replace ?: with min to calculate the number of bytes in the secondary buffer,
including changing the data type of data_in_secondary to size_t to be
type-consistent. data_in_secondary can never be negative.

Remove some spurious calculations (copy_to_user returns zero on success),
making one variable redundant (i)

This change does not alter the functionality of the code.

Signed-off-by: default avatarDaniel M German <dmg@turingmachine.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 235e6e0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment