summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-picolcd_lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-picolcd_lcd.c')
-rw-r--r--drivers/hid/hid-picolcd_lcd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-picolcd_lcd.c b/drivers/hid/hid-picolcd_lcd.c
index 64a067fc837c..2d0ddc5ac65f 100644
--- a/drivers/hid/hid-picolcd_lcd.c
+++ b/drivers/hid/hid-picolcd_lcd.c
@@ -47,7 +47,8 @@ static int picolcd_set_contrast(struct lcd_device *ldev, int contrast)
data->lcd_contrast = contrast & 0x0ff;
spin_lock_irqsave(&data->lock, flags);
hid_set_field(report->field[0], 0, data->lcd_contrast);
- usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
+ if (!(data->status & PICOLCD_FAILED))
+ usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
spin_unlock_irqrestore(&data->lock, flags);
return 0;
}