Skip to content

Commit

Permalink
parport: dead code in pp_write
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Jiri Kosina committed Oct 15, 2012
1 parent 1b61810 commit 5d0c3d4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/char/ppdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 5d0c3d4

Please sign in to comment.