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-s3c2412.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-s3c24xx/iotiming-s3c2412.c') 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