mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
usb: misc: adutux: remove redundant error check on copy_to_user return code
The 2nd check for a non-zero return from copy_to_user is redundant as
it is has already been made a few lines earlier. This check was made
redundant because of previous fix to the copy_to_user error return
check.
Detected by CoverityScan, CID#114347 ("Logically Dead Code")
Fixes: 1865a9c382
("USB: adutux: fix misuse of return value of copy_to_user()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4f8c483ab4
commit
453785c64e
1 changed files with 0 additions and 4 deletions
|
@ -389,10 +389,6 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
|
||||||
dev->secondary_head += (amount - i);
|
dev->secondary_head += (amount - i);
|
||||||
bytes_read += (amount - i);
|
bytes_read += (amount - i);
|
||||||
bytes_to_read -= (amount - i);
|
bytes_to_read -= (amount - i);
|
||||||
if (i) {
|
|
||||||
retval = bytes_read ? bytes_read : -EFAULT;
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* we check the primary buffer */
|
/* we check the primary buffer */
|
||||||
spin_lock_irqsave (&dev->buflock, flags);
|
spin_lock_irqsave (&dev->buflock, flags);
|
||||||
|
|
Loading…
Reference in a new issue