diff options
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index dafd9ac6428f..0913d79424d3 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -622,9 +622,12 @@ static int lp_do_ioctl(unsigned int minor, unsigned int cmd, | |||
622 | return -EFAULT; | 622 | return -EFAULT; |
623 | break; | 623 | break; |
624 | case LPGETSTATUS: | 624 | case LPGETSTATUS: |
625 | if (mutex_lock_interruptible(&lp_table[minor].port_mutex)) | ||
626 | return -EINTR; | ||
625 | lp_claim_parport_or_block (&lp_table[minor]); | 627 | lp_claim_parport_or_block (&lp_table[minor]); |
626 | status = r_str(minor); | 628 | status = r_str(minor); |
627 | lp_release_parport (&lp_table[minor]); | 629 | lp_release_parport (&lp_table[minor]); |
630 | mutex_unlock(&lp_table[minor].port_mutex); | ||
628 | 631 | ||
629 | if (copy_to_user(argp, &status, sizeof(int))) | 632 | if (copy_to_user(argp, &status, sizeof(int))) |
630 | return -EFAULT; | 633 | return -EFAULT; |