irqchip: irq-crossbar: Not allocating enough memory
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 3 Apr 2014 07:21:34 +0000 (10:21 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 28 Apr 2014 19:43:24 +0000 (21:43 +0200)
commit3894e9e82dfdc87fa35dc7976e0472d220228826
treeff20bd710bb1b3f22929f19c7d53ba4f8388e50c
parent8cc3cfc5ccf1680b7c88f874912b6bec2797b76b
irqchip: irq-crossbar: Not allocating enough memory

We are allocating the size of a pointer and not the size of the data.
This will lead to memory corruption.

There isn't actually a "cb_device" struct, btw.  The code is only able
to compile because GCC knows that all pointers are the same size.

Fixes: 96ca848ef7ea ('DRIVERS: IRQCHIP: CROSSBAR: Add support for Crossbar IP')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sricharan R <r.sricharan@ti.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Link: http://lkml.kernel.org/r/20140403072134.GA14286@mwanda
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/irqchip/irq-crossbar.c