aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds2016-03-06 11:03:34 -0800
committerLinus Torvalds2016-03-06 11:03:34 -0800
commit7addb7fa1085e29398c2aef43f0b98c3c4b7e749 (patch)
tree018732a4fc23772498f64e62706066087fc733a4
parent3e09b7e93dae6cd9fcabc5dd36fc6973d3049c30 (diff)
parent7314d22a2f5bd40468d57768be368c3d9b4bd726 (diff)
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
-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;