summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-10-01 19:24:17 +0400
committerJiri Kosina <jkosina@suse.cz>2012-10-16 00:46:41 +0400
commit5d0c3d4f3d48681c2ba51e9f9ed6ae5dc4a34a47 (patch)
treebcaa7e3c0a6ae164f0f75a4fd7a31228028baaa1 /drivers/char
parent1b61810d196b84bfdc14c289126d98de765b7f97 (diff)
downloadlinux-5d0c3d4f3d48681c2ba51e9f9ed6ae5dc4a34a47.tar.xz
parport: dead code in pp_write
We always update bytes_written before we check signal_pending so it follows that we can't get a signal return for 0 bytes so we don't need to check in the singal path. The cases a signal causes an earlier abort are handled before this and will not hit this path Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ppdev.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index 3fcf80ff12f2..99c51b4b07e7 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -251,12 +251,8 @@ static ssize_t pp_write (struct file * file, const char __user * buf,
break;
}
- if (signal_pending (current)) {
- if (!bytes_written) {
- bytes_written = -EINTR;
- }
+ if (signal_pending (current))
break;
- }
cond_resched();
}