summaryrefslogtreecommitdiff
path: root/arch/cris
diff options
context:
space:
mode:
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>2015-05-01 16:58:19 +0300
committerJesper Nilsson <jespern@axis.com>2015-09-05 01:33:24 +0300
commit6a4756f6951f97a9a601ba24632c5906750ef00d (patch)
tree34164b443bba232e2dc729c467cb5e042ea844ea /arch/cris
parent51e771c0d25b43d0f12b2c7c01939942becbbe28 (diff)
downloadlinux-6a4756f6951f97a9a601ba24632c5906750ef00d.tar.xz
cris: arch-v32: gpio: Use kzalloc instead of kmalloc/memset
Turn a kmalloc/memset into an equivalent kzalloc. Doing so also move the zero'ing of the memory outside of a mutex. Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr> Signed-off-by: Jesper Nilsson <jespern@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/arch-v32/drivers/mach-fs/gpio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/cris/arch-v32/drivers/mach-fs/gpio.c b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
index 009f4ee1bd09..72968fbf814b 100644
--- a/arch/cris/arch-v32/drivers/mach-fs/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
@@ -425,12 +425,11 @@ gpio_open(struct inode *inode, struct file *filp)
if (p > GPIO_MINOR_LAST)
return -EINVAL;
- priv = kmalloc(sizeof(struct gpio_private), GFP_KERNEL);
+ priv = kzalloc(sizeof(struct gpio_private), GFP_KERNEL);
if (!priv)
return -ENOMEM;
mutex_lock(&gpio_mutex);
- memset(priv, 0, sizeof(*priv));
priv->minor = p;