mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
Date: Tue, 23 Aug 2016 09:58:14 +0200	[thread overview]
Message-ID: <f0eeb1b0-5572-506d-0029-30b676c15a57@baylibre.com> (raw)
In-Reply-To: <1471882101-22347-1-git-send-email-weiyj.lk@gmail.com>

On 08/22/2016 06:08 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> sizeof() when applied to a pointer typed expression gives the
> size of the pointer, not that of the pointed data.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/clk/meson/gxbb-aoclk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c
> index 61ef28a..b45c5fb 100644
> --- a/drivers/clk/meson/gxbb-aoclk.c
> +++ b/drivers/clk/meson/gxbb-aoclk.c
> @@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct gxbb_aoclk_reset_controller *rstc;
>  
> -	rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL);
> +	rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL);
>  	if (!rstc)
>  		return -ENOMEM;
>  
> 
> 
> 

Aww, my bad.

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Also :
Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver")

  reply	other threads:[~2016-08-23  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22 16:08 Wei Yongjun
2016-08-23  7:58 ` Neil Armstrong [this message]
2016-08-24 17:29 ` Stephen Boyd

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=f0eeb1b0-5572-506d-0029-30b676c15a57@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=linus-amlogic@lists.infradead.org \
    /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

all inboxes | Powered by JetHome®