aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2016-02-21 15:22:27 +0100
committerDarren Hart <dvhart@linux.intel.com>2016-03-23 10:05:48 -0700
commite8b69a51b4e72a168e8b3bc5fcac39a7de339864 (patch)
treefb96bb769488de24ebf272da44216c65a8abe4e6 /drivers/platform
parentplatform/x86: Make intel_scu_ipc explicitly non-modular (diff)
downloadlinux-dev-e8b69a51b4e72a168e8b3bc5fcac39a7de339864.tar.xz
linux-dev-e8b69a51b4e72a168e8b3bc5fcac39a7de339864.zip
intel-hid: allocate correct amount of memory for private struct
We want the size of the struct, not of a pointer to it. To be future proof, just dereference the pointer to get the desired type. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel-hid.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
index 20f0ad9bb9f3..9d15afe70b4f 100644
--- a/drivers/platform/x86/intel-hid.c
+++ b/drivers/platform/x86/intel-hid.c
@@ -181,8 +181,7 @@ static int intel_hid_probe(struct platform_device *device)
return -ENODEV;
}
- priv = devm_kzalloc(&device->dev,
- sizeof(struct intel_hid_priv *), GFP_KERNEL);
+ priv = devm_kzalloc(&device->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
dev_set_drvdata(&device->dev, priv);