On Wed, Aug 18, 2010 at 12:59 PM, Lorenzo Pieralisi <[email protected]> wrote: > When instantiating amba devices dynamically from device tree nodes, the > memory allocation should be carried out using the kzalloc function to make > sure all the members are zero initialized. > > This patch replaces the kmalloc call with a kzalloc one. > > Signed-off-by: Lorenzo Pieralisi <[email protected]>
Fixed in my tree. You'll be able to drop this one when you rebase. g. > --- > drivers/amba/bus.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c > index d73302c..234f4a3 100644 > --- a/drivers/amba/bus.c > +++ b/drivers/amba/bus.c > @@ -421,7 +421,7 @@ static int amba_add_device_from_node(struct device_node > *node) > const char *name; > int i, ret, len; > > - dev = kmalloc(sizeof(*dev), GFP_KERNEL); > + dev = kzalloc(sizeof(*dev), GFP_KERNEL); > if (!dev) > return -ENOMEM; > > -- > 1.6.3.3 > > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
