diff options
author | Alan Cox <alan@linux.intel.com> | 2012-10-01 16:24:17 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-10-15 22:46:41 +0200 |
commit | 5d0c3d4f3d48681c2ba51e9f9ed6ae5dc4a34a47 (patch) | |
tree | bcaa7e3c0a6ae164f0f75a4fd7a31228028baaa1 /drivers/char | |
parent | 1b61810d196b84bfdc14c289126d98de765b7f97 (diff) | |
download | blackbird-op-linux-5d0c3d4f3d48681c2ba51e9f9ed6ae5dc4a34a47.tar.gz blackbird-op-linux-5d0c3d4f3d48681c2ba51e9f9ed6ae5dc4a34a47.zip |
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.c | 6 |
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(); } |