summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-06 20:03:34 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-06 20:03:34 +0100
commit7addb7fa1085e29398c2aef43f0b98c3c4b7e749 (patch)
tree018732a4fc23772498f64e62706066087fc733a4 /drivers
parentMerge tag 'usb-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/greg... (diff)
parenti2c: brcmstb: allocate correct amount of memory for regmap (diff)
downloadlinux-7addb7fa1085e29398c2aef43f0b98c3c4b7e749.tar.xz
linux-7addb7fa1085e29398c2aef43f0b98c3c4b7e749.zip
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fix from Wolfram Sang: "One I2C bugfix ensuring correct memory allocation in a driver" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: brcmstb: allocate correct amount of memory for regmap
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-brcmstb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index 3711df1d4526..4a45408dd820 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -586,8 +586,7 @@ static int brcmstb_i2c_probe(struct platform_device *pdev)
if (!dev)
return -ENOMEM;
- dev->bsc_regmap = devm_kzalloc(&pdev->dev, sizeof(struct bsc_regs *),
- GFP_KERNEL);
+ dev->bsc_regmap = devm_kzalloc(&pdev->dev, sizeof(*dev->bsc_regmap), GFP_KERNEL);
if (!dev->bsc_regmap)
return -ENOMEM;