-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In both the read and write cases it will return an error if copy_{from/to}_user faults. However, I let the driver try to read/write as much as it can just as it normally would , then finally it returns an error if there was one. This was the most straight forward way to handle the error , since there isn't a clear way to clean up the buffers on error . I moved retval in idetape_chrdev_write() down into the actual code blocks since it's really once used there, and it conflicted with my ret variable. Fixes the following warning, drivers/ide/ide-tape.c: In function �idetape_copy_stage_from_user�: drivers/ide/ide-tape.c:2662: warning: ignoring return value of �copy_from_user�, declared with attribute warn_unused_result drivers/ide/ide-tape.c: In function �idetape_copy_stage_to_user�: drivers/ide/ide-tape.c:2689: warning: ignoring return value of �copy_to_user�, declared with attribute warn_unused_result Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- Loading branch information
Daniel Walker
authored and
Linus Torvalds
committed
Jun 25, 2006
1 parent
a04ee14
commit dcd9637
Showing
1 changed file
with
33 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters