diff options
Diffstat (limited to 'drivers/usb/class/usblp.c')
| -rw-r--r-- | drivers/usb/class/usblp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 7ce43fb8118a..e195709c9c7f 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
| @@ -310,8 +310,9 @@ static int usblp_check_status(struct usblp *usblp, int err) | |||
| 310 | 310 | ||
| 311 | error = usblp_read_status (usblp, usblp->statusbuf); | 311 | error = usblp_read_status (usblp, usblp->statusbuf); |
| 312 | if (error < 0) { | 312 | if (error < 0) { |
| 313 | err("usblp%d: error %d reading printer status", | 313 | if (printk_ratelimit()) |
| 314 | usblp->minor, error); | 314 | err("usblp%d: error %d reading printer status", |
| 315 | usblp->minor, error); | ||
| 315 | return 0; | 316 | return 0; |
| 316 | } | 317 | } |
| 317 | 318 | ||
| @@ -604,7 +605,9 @@ static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
| 604 | 605 | ||
| 605 | case LPGETSTATUS: | 606 | case LPGETSTATUS: |
| 606 | if (usblp_read_status(usblp, usblp->statusbuf)) { | 607 | if (usblp_read_status(usblp, usblp->statusbuf)) { |
| 607 | err("usblp%d: failed reading printer status", usblp->minor); | 608 | if (printk_ratelimit()) |
| 609 | err("usblp%d: failed reading printer status", | ||
| 610 | usblp->minor); | ||
| 608 | retval = -EIO; | 611 | retval = -EIO; |
| 609 | goto done; | 612 | goto done; |
| 610 | } | 613 | } |
