summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-11-24 09:40:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-24 09:40:26 -0800
commite2b6535d47ce223e327de053b804d2e572a98bbc (patch)
tree9fe058979fb2e8c038ed68ac57b5f0901c977e37 /drivers/hid/hid-sensor-hub.c
parent18594e9bc4a27e72d7961a7afe4250a502d1538d (diff)
parentd443a0aa3a291e5f78072f2fa464e03bc83fafad (diff)
downloadtalos-op-linux-e2b6535d47ce223e327de053b804d2e572a98bbc.tar.gz
talos-op-linux-e2b6535d47ce223e327de053b804d2e572a98bbc.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina: - DMA-on-stack fixes for a couple drivers, from Benjamin Tissoires - small memory sanitization fix for sensor-hub driver, from Song Hongyan * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: hid-sensor-hub: clear memory to avoid random data HID: rmi: make transfer buffers DMA capable HID: magicmouse: make transfer buffers DMA capable HID: lg: make transfer buffers DMA capable HID: cp2112: make transfer buffers DMA capable
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-rw-r--r--drivers/hid/hid-sensor-hub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index c5c3d6111729..60875625cbdf 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -212,6 +212,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
__s32 value;
int ret = 0;
+ memset(buffer, 0, buffer_size);
mutex_lock(&data->mutex);
report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT);
if (!report || (field_index >= report->maxfield)) {
OpenPOWER on IntegriCloud