diff options
Diffstat (limited to 'drivers/hid/hid-picolcd_leds.c')
-rw-r--r-- | drivers/hid/hid-picolcd_leds.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-picolcd_leds.c b/drivers/hid/hid-picolcd_leds.c index 9249c068a485..5573cd8b240b 100644 --- a/drivers/hid/hid-picolcd_leds.c +++ b/drivers/hid/hid-picolcd_leds.c @@ -69,6 +69,8 @@ static void picolcd_led_set_brightness(struct led_classdev *led_cdev, dev = led_cdev->dev->parent; hdev = container_of(dev, struct hid_device, dev); data = hid_get_drvdata(hdev); + if (!data) + return; for (i = 0; i < 8; i++) { if (led_cdev != data->led[i]) continue; |