summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-74x164.c
diff options
context:
space:
mode:
authorRoland Stigge <stigge@antcom.de>2012-10-16 15:24:01 +0200
committerLinus Walleij <linus.walleij@linaro.org>2012-10-16 19:34:43 +0200
commita48221a26e4914b7e2d8a1749b6115212bac8bee (patch)
treead43f0f9e02992f4ad4481496ea9ee331a9cafc2 /drivers/gpio/gpio-74x164.c
parentd79550a7bc35c16476ebdc27c78378d8093390ec (diff)
gpio-74x164: Fix buffer allocation size
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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-74x164.c')
-rw-r--r--drivers/gpio/gpio-74x164.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c
index ed3e55161bd..f05e54258ff 100644
--- a/drivers/gpio/gpio-74x164.c
+++ b/drivers/gpio/gpio-74x164.c
@@ -153,7 +153,7 @@ static int __devinit gen_74x164_probe(struct spi_device *spi)
}
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;