[PATCH] i2c: brcmstb: allocate correct amount of memory for regmap

Kamal Dasu kdasu.kdev at gmail.com
Tue Mar 1 08:14:51 PST 2016


Wolfram,

I found a minor checkpatch issue with the change while applying the
patch to my local branch.

WARNING: line over 80 characters
#11: FILE: drivers/i2c/busses/i2c-brcmstb.c:589:
+       dev->bsc_regmap = devm_kzalloc(&pdev->dev,
sizeof(*dev->bsc_regmap), GFP_KERNEL);

Kamal

On Thu, Feb 25, 2016 at 2:32 PM, Kamal Dasu <kdasu.kdev at gmail.com> wrote:
>> 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.
>
> Thanks for catching and fixing this.
>
>>
>> Signed-off-by: Wolfram Sang <wsa at the-dreams.de>
>
> Reviewed-by: Kamal Dasu <kdasu.kdev at gmail.com>
>
> Kamal



More information about the linux-arm-kernel mailing list