* [PATCH] gpio-74x164: Fix buffer allocation size
@ 2012-10-16 13:24 Roland Stigge
2012-10-16 17:35 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Roland Stigge @ 2012-10-16 13:24 UTC (permalink / raw)
To: maxime.ripard, grant.likely, linus.walleij, linux-kernel; +Cc: Roland Stigge
The new registers handling in the gpio-74x164 driver allocates chip->registers
* 8 bytes where only one byte per register is necessary. This patch fixes this.
Signed-off-by: Roland Stigge <stigge@antcom.de>
---
drivers/gpio/gpio-74x164.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.orig/drivers/gpio/gpio-74x164.c
+++ linux-2.6/drivers/gpio/gpio-74x164.c
@@ -153,7 +153,7 @@ static int __devinit gen_74x164_probe(st
}
chip->gpio_chip.ngpio = GEN_74X164_NUMBER_GPIOS * chip->registers;
- chip->buffer = devm_kzalloc(&spi->dev, chip->gpio_chip.ngpio, GFP_KERNEL);
+ chip->buffer = devm_kzalloc(&spi->dev, chip->registers, GFP_KERNEL);
if (!chip->buffer) {
ret = -ENOMEM;
goto exit_destroy;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio-74x164: Fix buffer allocation size
2012-10-16 13:24 [PATCH] gpio-74x164: Fix buffer allocation size Roland Stigge
@ 2012-10-16 17:35 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2012-10-16 17:35 UTC (permalink / raw)
To: Roland Stigge; +Cc: maxime.ripard, grant.likely, linux-kernel
On Tue, Oct 16, 2012 at 3:24 PM, Roland Stigge <stigge@antcom.de> wrote:
> The new registers handling in the gpio-74x164 driver allocates chip->registers
> * 8 bytes where only one byte per register is necessary. This patch fixes this.
>
> Signed-off-by: Roland Stigge <stigge@antcom.de>
Patch applied to my fixes branch unless someone shouts...
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-16 17:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 13:24 [PATCH] gpio-74x164: Fix buffer allocation size Roland Stigge
2012-10-16 17:35 ` Linus Walleij
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®