summaryrefslogtreecommitdiff
path: root/arch/x86/platform
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/platform')
-rw-r--r--arch/x86/platform/efi/runtime-map.c4
-rw-r--r--arch/x86/platform/geode/geode-common.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/platform/efi/runtime-map.c b/arch/x86/platform/efi/runtime-map.c
index a6f02cef3ca2..77699893b5bb 100644
--- a/arch/x86/platform/efi/runtime-map.c
+++ b/arch/x86/platform/efi/runtime-map.c
@@ -114,7 +114,7 @@ add_sysfs_runtime_map_entry(struct kobject *kobj, int nr,
return ERR_PTR(-ENOMEM);
}
- entry = kzalloc(sizeof(*entry), GFP_KERNEL);
+ entry = kzalloc_obj(*entry, GFP_KERNEL);
if (!entry) {
kset_unregister(map_kset);
map_kset = NULL;
@@ -166,7 +166,7 @@ static int __init efi_runtime_map_init(void)
if (!efi_enabled(EFI_MEMMAP) || !efi_kobj)
return 0;
- map_entries = kcalloc(efi.memmap.nr_map, sizeof(entry), GFP_KERNEL);
+ map_entries = kzalloc_objs(entry, efi.memmap.nr_map, GFP_KERNEL);
if (!map_entries) {
ret = -ENOMEM;
goto out;
diff --git a/arch/x86/platform/geode/geode-common.c b/arch/x86/platform/geode/geode-common.c
index 8fd78e60bf15..f3c9eff2d374 100644
--- a/arch/x86/platform/geode/geode-common.c
+++ b/arch/x86/platform/geode/geode-common.c
@@ -113,7 +113,7 @@ int __init geode_create_leds(const char *label, const struct geode_led *leds,
return -EINVAL;
}
- swnodes = kcalloc(n_leds, sizeof(*swnodes), GFP_KERNEL);
+ swnodes = kzalloc_objs(*swnodes, n_leds, GFP_KERNEL);
if (!swnodes)
return -ENOMEM;
@@ -121,7 +121,7 @@ int __init geode_create_leds(const char *label, const struct geode_led *leds,
* Each LED is represented by 3 properties: "gpios",
* "linux,default-trigger", and am empty terminator.
*/
- props = kcalloc(n_leds * 3, sizeof(*props), GFP_KERNEL);
+ props = kzalloc_objs(*props, n_leds * 3, GFP_KERNEL);
if (!props) {
err = -ENOMEM;
goto err_free_swnodes;