mtd: physmap_of: Correct the size argument to kzalloc
authorJulia Lawall <julia@diku.dk>
Tue, 29 Dec 2009 19:15:23 +0000 (20:15 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 2 Jan 2010 10:04:56 +0000 (10:04 +0000)
commite026255f7d0e56006a147b190ae23be95cb0a9bd
tree6bfc2be2cc917e65aedf2d18b6b3cd696974c934
parentbb6a77554935a86686039097cdda2b2a38891c78
mtd: physmap_of: Correct the size argument to kzalloc

mtd_list has type struct mtd_info **, not struct mtd_info *, so the
elements of the array should have pointer type, not structure type.

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: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/maps/physmap_of.c