diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-10-02 19:16:58 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzk@kernel.org> | 2017-10-04 21:09:05 +0200 |
commit | 637a75207087b4e862e0b5016547dbf8753b4346 (patch) | |
tree | 47634af33daaa09c8f35a7c39d90738729b33df0 /arch/arm/mach-s3c24xx | |
parent | ARM: s3c24xx: Remove printk for failed memory allocation in iotiming get (diff) | |
download | linux-637a75207087b4e862e0b5016547dbf8753b4346.tar.xz linux-637a75207087b4e862e0b5016547dbf8753b4346.zip |
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 <elfring@users.sourceforge.net>
[krzk: Rewrite commit message]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'arch/arm/mach-s3c24xx')
-rw-r--r-- | arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 | ||||
-rw-r--r-- | 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; |