lkml.org 
[lkml]   [2014]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: omap-usb-tll: allocate correct size for ch_clk
Hi Colin,

On 02/10/2014 09:54 PM, Lee Jones wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> ch_clk was erroneously being allocated the incorrect size which
>> can be problematic for larger sizes of tll->nch

The code fix is good but the subject and description aren't right.

You could instead mention about the cppcheck warning and hard to read
code.

>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>> drivers/mfd/omap-usb-tll.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
>> index 5ee50f7..532eacab 100644
>> --- a/drivers/mfd/omap-usb-tll.c
>> +++ b/drivers/mfd/omap-usb-tll.c
>> @@ -252,7 +252,7 @@ static int usbtll_omap_probe(struct platform_device *pdev)
>> break;
>> }
>>
>> - tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk * [tll->nch]),
>> + tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk *) * tll->nch,
>> GFP_KERNEL);
>> if (!tll->ch_clk) {
>> ret = -ENOMEM;
>
> Thanks Colin, patch looks good to me.
>
> Roger, fancy finishing this off with an Acked-by?
>

cheers,
-roger


\
 
 \ /
  Last update: 2014-02-11 10:21    [W:0.056 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site