summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-rw-r--r--drivers/hid/hid-sensor-hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 0edec902be41..90666ff629de 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -139,7 +139,7 @@ int sensor_hub_register_callback(struct hid_sensor_hub_device *hsdev,
spin_unlock_irqrestore(&pdata->dyn_callback_lock, flags);
return -EINVAL;
}
- callback = kzalloc(sizeof(*callback), GFP_ATOMIC);
+ callback = kzalloc_obj(*callback, GFP_ATOMIC);
if (!callback) {
spin_unlock_irqrestore(&pdata->dyn_callback_lock, flags);
return -ENOMEM;