mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: Colin King <colin.king@canonical.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mfd: omap-usb-tll: allocate correct size for ch_clk
Date: Tue, 11 Feb 2014 10:54:54 +0200	[thread overview]
Message-ID: <52F9E55E.2050708@ti.com> (raw)
In-Reply-To: <20140210195421.GB31864@lee--X1>

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

      reply	other threads:[~2014-02-11  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 19:10 Colin King
2014-02-10 19:54 ` Lee Jones
2014-02-11  8:54   ` Roger Quadros [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52F9E55E.2050708@ti.com \
    --to=rogerq@ti.com \
    --cc=colin.king@canonical.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome