aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/thermal-generic-adc.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-08-20 18:05:17 +0200
committerJiri Kosina <jkosina@suse.cz>2018-08-20 18:05:17 +0200
commit415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch)
tree47492d2386a0e7f00ef645313cb44ae4960b7e7e /drivers/thermal/thermal-generic-adc.c
parentHID: hiddev: fix potential Spectre v1 (diff)
parentHID: cougar: Add support for the Cougar 500k Gaming Keyboard (diff)
downloadlinux-dev-415d2b3392d7a80903e0f97f051201aa02bf20e9.tar.xz
linux-dev-415d2b3392d7a80903e0f97f051201aa02bf20e9.zip
Merge branch 'for-4.19/cougar' into for-linus
New device support for hid-cougar
Diffstat (limited to 'drivers/thermal/thermal-generic-adc.c')
-rw-r--r--drivers/thermal/thermal-generic-adc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c
index 46d3005335c7..bf1c628d4a7a 100644
--- a/drivers/thermal/thermal-generic-adc.c
+++ b/drivers/thermal/thermal-generic-adc.c
@@ -87,8 +87,9 @@ static int gadc_thermal_read_linear_lookup_table(struct device *dev,
return -EINVAL;
}
- gti->lookup_table = devm_kzalloc(dev, sizeof(*gti->lookup_table) *
- ntable, GFP_KERNEL);
+ gti->lookup_table = devm_kcalloc(dev,
+ ntable, sizeof(*gti->lookup_table),
+ GFP_KERNEL);
if (!gti->lookup_table)
return -ENOMEM;