* [PATCH 6/7] drivers/usb: Use kzalloc for allocating only one thing
@ 2009-12-19 7:17 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2009-12-19 7:17 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-usb, linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
Use kzalloc rather than kcalloc(1,...)
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
@@
- kcalloc(1,
+ kzalloc(
...)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/usb/host/isp1362-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
--- a/drivers/usb/host/isp1362-hcd.c 2009-12-17 08:30:14.000000000 +0100
+++ b/drivers/usb/host/isp1362-hcd.c 2009-12-19 07:52:56.000000000 +0100
@@ -1257,7 +1257,7 @@ static int isp1362_urb_enqueue(struct us
/* avoid all allocations within spinlocks: request or endpoint */
if (!hep->hcpriv) {
- ep = kcalloc(1, sizeof *ep, mem_flags);
+ ep = kzalloc(sizeof *ep, mem_flags);
if (!ep)
return -ENOMEM;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-19 7:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-19 7:17 [PATCH 6/7] drivers/usb: Use kzalloc for allocating only one thing Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®