projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f52ab44
)
intel-hid: allocate correct amount of memory for private struct
author
Wolfram Sang
<wsa@the-dreams.de>
Sun, 21 Feb 2016 14:22:27 +0000
(15:22 +0100)
committer
Darren Hart
<dvhart@linux.intel.com>
Wed, 23 Mar 2016 17:05:48 +0000
(10:05 -0700)
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>
drivers/platform/x86/intel-hid.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/platform/x86/intel-hid.c
b/drivers/platform/x86/intel-hid.c
index 20f0ad9bb9f373efedfdf42de3af7da5321f21a6..9d15afe70b4ffaac461369d331699a7cc4399852 100644
(file)
--- 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);