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, | |||
69 | dev = led_cdev->dev->parent; | 69 | dev = led_cdev->dev->parent; |
70 | hdev = container_of(dev, struct hid_device, dev); | 70 | hdev = container_of(dev, struct hid_device, dev); |
71 | data = hid_get_drvdata(hdev); | 71 | data = hid_get_drvdata(hdev); |
72 | if (!data) | ||
73 | return; | ||
72 | for (i = 0; i < 8; i++) { | 74 | for (i = 0; i < 8; i++) { |
73 | if (led_cdev != data->led[i]) | 75 | if (led_cdev != data->led[i]) |
74 | continue; | 76 | continue; |