USB: FHCI: Correct the size argument to kzalloc
commit4585ef11d23aa9dbbf776b135ba70577df97587b
authorJulia Lawall <julia@diku.dk>
Wed, 30 Dec 2009 14:34:37 +0000 (30 15:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:54:00 +0000 (2 14:54 -0800)
treed12fd11671b7f30b0de88a8533ffc0785eff1183
parent0f2c2d7bbb51338fdcda9670795a6c6e348622d9
USB: FHCI: Correct the size argument to kzalloc

urb_priv->tds has type struct td **, not struct td *, so the
elements of the array should have pointer type, not structure type.

Convert kzalloc to kcalloc as well.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@disable sizeof_type_expr@
type T;
T **x;
@@

  x =
  <+...sizeof(
- T
+ *x
  )...+>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/fhci-hcd.c