diff options
Diffstat (limited to 'arch/arm/mach-s3c24xx/iotiming-s3c2410.c')
-rw-r--r-- | arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c index b7970f1fa3d5..9f90aaf70bf3 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c @@ -1,14 +1,10 @@ -/* - * Copyright (c) 2006-2009 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * Ben Dooks <ben@simtec.co.uk> - * - * S3C24XX CPU Frequency scaling - IO timing for S3C2410/S3C2440/S3C2442 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ +// SPDX-License-Identifier: GPL-2.0 +// +// Copyright (c) 2006-2009 Simtec Electronics +// http://armlinux.simtec.co.uk/ +// Ben Dooks <ben@simtec.co.uk> +// +// S3C24XX CPU Frequency scaling - IO timing for S3C2410/S3C2440/S3C2442 #include <linux/init.h> #include <linux/kernel.h> @@ -206,7 +202,7 @@ static int calc_tacc(unsigned int cyc, int nwait_en, } /** - * s3c2410_calc_bank - calculate bank timing infromation + * s3c2410_calc_bank - calculate bank timing information * @cfg: The configuration we need to calculate for. * @bt: The bank timing information. * @@ -453,11 +449,9 @@ 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); - if (!bt) { - printk(KERN_ERR "%s: no memory for bank\n", __func__); + bt = kzalloc(sizeof(*bt), GFP_KERNEL); + if (!bt) return -ENOMEM; - } /* find out in nWait is enabled for bank. */ |