From 5d0c3d4f3d48681c2ba51e9f9ed6ae5dc4a34a47 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 1 Oct 2012 16:24:17 +0100 Subject: 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 Signed-off-by: Jiri Kosina --- drivers/char/ppdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/char') 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(); } -- cgit v1.2.1