[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <0d6047c2d4dc00ac399310ea33f0c15aef83253b.1436813029.git.christophe.jaillet@wanadoo.fr>
Date: Mon, 13 Jul 2015 20:51:32 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: benjamin.romer@...sys.com, david.kershner@...sys.com,
gregkh@...uxfoundation.org
Cc: sparmaintainer@...sys.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH 1/2] staging: unisys: Use kzalloc instead of kmalloc/memset
This patch turns a kmalloc/memset into an equivalent kzalloc.
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
drivers/staging/unisys/visorbus/visorbus_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 6db4719..bbc907d 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -281,12 +281,11 @@ devmajorminor_create_file(struct visor_device *dev, const char *name,
rc = -ENOMEM;
goto away;
}
- myattr = kmalloc(sizeof(*myattr), GFP_KERNEL);
+ myattr = kzalloc(sizeof(*myattr), GFP_KERNEL);
if (!myattr) {
rc = -ENOMEM;
goto away;
}
- memset(myattr, 0, sizeof(struct devmajorminor_attribute));
myattr->show = DEVMAJORMINOR_ATTR;
myattr->store = NULL;
myattr->slot = slot;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists