diff options
-rw-r--r-- | drivers/hid/hid-input.c | 2 | ||||
-rw-r--r-- | drivers/hid/i2c-hid/i2c-hid.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index d50e7313b171..a713e6211419 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -1178,7 +1178,7 @@ static void hidinput_led_worker(struct work_struct *work) | |||
1178 | 1178 | ||
1179 | /* fall back to generic raw-output-report */ | 1179 | /* fall back to generic raw-output-report */ |
1180 | len = ((report->size - 1) >> 3) + 1 + (report->id > 0); | 1180 | len = ((report->size - 1) >> 3) + 1 + (report->id > 0); |
1181 | buf = kmalloc(len, GFP_KERNEL); | 1181 | buf = hid_alloc_report_buf(report, GFP_KERNEL); |
1182 | if (!buf) | 1182 | if (!buf) |
1183 | return; | 1183 | return; |
1184 | 1184 | ||
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index e914f2755491..ce68a120ba26 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c | |||
@@ -582,7 +582,7 @@ static void i2c_hid_request(struct hid_device *hid, struct hid_report *rep, | |||
582 | int ret; | 582 | int ret; |
583 | int len = i2c_hid_get_report_length(rep) - 2; | 583 | int len = i2c_hid_get_report_length(rep) - 2; |
584 | 584 | ||
585 | buf = kzalloc(len, GFP_KERNEL); | 585 | buf = hid_alloc_report_buf(rep, GFP_KERNEL); |
586 | if (!buf) | 586 | if (!buf) |
587 | return; | 587 | return; |
588 | 588 | ||