diff options
-rw-r--r-- | drivers/hid/hid-sony.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 30dbb6b40bbf..b18320db5f7d 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -537,6 +537,10 @@ static int buzz_init(struct hid_device *hdev) | |||
537 | drv_data = hid_get_drvdata(hdev); | 537 | drv_data = hid_get_drvdata(hdev); |
538 | BUG_ON(!(drv_data->quirks & BUZZ_CONTROLLER)); | 538 | BUG_ON(!(drv_data->quirks & BUZZ_CONTROLLER)); |
539 | 539 | ||
540 | /* Validate expected report characteristics. */ | ||
541 | if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 0, 0, 7)) | ||
542 | return -ENODEV; | ||
543 | |||
540 | buzz = kzalloc(sizeof(*buzz), GFP_KERNEL); | 544 | buzz = kzalloc(sizeof(*buzz), GFP_KERNEL); |
541 | if (!buzz) { | 545 | if (!buzz) { |
542 | hid_err(hdev, "Insufficient memory, cannot allocate driver data\n"); | 546 | hid_err(hdev, "Insufficient memory, cannot allocate driver data\n"); |