Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a48221a2 authored by Roland Stigge's avatar Roland Stigge Committed by Linus Walleij
Browse files

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: default avatarRoland Stigge <stigge@antcom.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent d79550a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;