Skip to contentSkip to conversation

Patch "i2c: brcmstb: allocate correct amount of memory for regmap" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 7, 2016

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

i2c: brcmstb: allocate correct amount of memory for regmap

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
i2c-brcmstb-allocate-correct-amount-of-memory-for-regmap.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 7314d22a2f5bd40468d57768be368c3d9b4bd726 Mon Sep 17 00:00:00 2001

From: Wolfram Sang <[email protected]>
Date: Sun, 21 Feb 2016 15:16:48 +0100
Subject: i2c: brcmstb: allocate correct amount of memory for regmap

From: Wolfram Sang <[email protected]>

commit 7314d22a2f5bd40468d57768be368c3d9b4bd726 upstream.

We want the size of the struct, not of a pointer to it. To be future proof, just dereference the pointer to get the desired type.

Fixes dd1aa2524bc5 ("i2c: brcmstb: Add Broadcom settop SoC i2c controller driver")
---
 drivers/i2c/busses/i2c-brcmstb.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/i2c/busses/i2c-brcmstb.c +1 -2
@@ -562,8 +562,7 @@ static int brcmstb_i2c_probe(struct plat
 	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;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/i2c-brcmstb-allocate-correct-amount-of-memory-for-regmap.patch