Skip to content

Commit

Permalink
gpio-74x164: Fix buffer allocation size
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
stigge authored and linusw committed Oct 16, 2012
1 parent d79550a commit a48221a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-74x164.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a48221a

Please sign in to comment.