diff options
author | Alan Cox <alan@linux.intel.com> | 2012-10-01 11:24:17 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-10-15 16:46:41 -0400 |
commit | 5d0c3d4f3d48681c2ba51e9f9ed6ae5dc4a34a47 (patch) | |
tree | bcaa7e3c0a6ae164f0f75a4fd7a31228028baaa1 /drivers/char | |
parent | 1b61810d196b84bfdc14c289126d98de765b7f97 (diff) |
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, | |||
251 | break; | 251 | break; |
252 | } | 252 | } |
253 | 253 | ||
254 | if (signal_pending (current)) { | 254 | if (signal_pending (current)) |
255 | if (!bytes_written) { | ||
256 | bytes_written = -EINTR; | ||
257 | } | ||
258 | break; | 255 | break; |
259 | } | ||
260 | 256 | ||
261 | cond_resched(); | 257 | cond_resched(); |
262 | } | 258 | } |