From 637a75207087b4e862e0b5016547dbf8753b4346 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Mon, 2 Oct 2017 19:16:58 +0200 Subject: ARM: s3c24xx: Simplify size used for kzalloc in iotiming get Simplify the size argument of kzalloc() memory allocation by using sizeof(*ptr) syntax. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [krzk: Rewrite commit message] Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c index f587c78fba33..c18769b5f15a 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c @@ -453,7 +453,7 @@ int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg, s3c_freq_iodbg("%s: bank %d: con %08lx\n", __func__, bank, bankcon); - bt = kzalloc(sizeof(struct s3c2410_iobank_timing), GFP_KERNEL); + bt = kzalloc(sizeof(*bt), GFP_KERNEL); if (!bt) return -ENOMEM; diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c index f09d5d5ea7ed..01bcd7d5dac7 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c @@ -242,7 +242,7 @@ int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg, if (!bank_is_io(bank, bankcfg)) continue; - bt = kzalloc(sizeof(struct s3c2412_iobank_timing), GFP_KERNEL); + bt = kzalloc(sizeof(*bt), GFP_KERNEL); if (!bt) return -ENOMEM; -- cgit v1.2.3