summaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c24xx
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-10-02 19:16:58 +0200
committerKrzysztof Kozlowski <krzk@kernel.org>2017-10-04 21:09:05 +0200
commit637a75207087b4e862e0b5016547dbf8753b4346 (patch)
tree47634af33daaa09c8f35a7c39d90738729b33df0 /arch/arm/mach-s3c24xx
parentb3b391f8e49cf71d70a95a55ad0808e1fdf3e130 (diff)
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.c2
-rw-r--r--arch/arm/mach-s3c24xx/iotiming-s3c2412.c2
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;