From: Simon Horman <horms+renesas@verge.net.au> To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] sh-pfc: sh_pfc_probe() sizeof() fix Date: Sat, 16 Feb 2013 02:25:53 +0000 [thread overview] Message-ID: <1360981553-11414-2-git-send-email-horms+renesas@verge.net.au> (raw) In-Reply-To: <1360981553-11414-1-git-send-email-horms+renesas@verge.net.au> From: Magnus Damm <damm@opensource.se> Fix sizeof() usage in sh-pfc/core.c to allocate space for the full data structure instead of a pointer. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- drivers/pinctrl/sh-pfc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index d323c24f..970ddff 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -495,7 +495,7 @@ static int sh_pfc_probe(struct platform_device *pdev) if (info = NULL) return -ENODEV; - pfc = devm_kzalloc(&pdev->dev, sizeof(pfc), GFP_KERNEL); + pfc = devm_kzalloc(&pdev->dev, sizeof(*pfc), GFP_KERNEL); if (pfc = NULL) return -ENOMEM; -- 1.7.10.4
WARNING: multiple messages have this Message-ID (diff)
From: horms+renesas@verge.net.au (Simon Horman) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] sh-pfc: sh_pfc_probe() sizeof() fix Date: Sat, 16 Feb 2013 11:25:53 +0900 [thread overview] Message-ID: <1360981553-11414-2-git-send-email-horms+renesas@verge.net.au> (raw) In-Reply-To: <1360981553-11414-1-git-send-email-horms+renesas@verge.net.au> From: Magnus Damm <damm@opensource.se> Fix sizeof() usage in sh-pfc/core.c to allocate space for the full data structure instead of a pointer. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- drivers/pinctrl/sh-pfc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index d323c24f..970ddff 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -495,7 +495,7 @@ static int sh_pfc_probe(struct platform_device *pdev) if (info == NULL) return -ENODEV; - pfc = devm_kzalloc(&pdev->dev, sizeof(pfc), GFP_KERNEL); + pfc = devm_kzalloc(&pdev->dev, sizeof(*pfc), GFP_KERNEL); if (pfc == NULL) return -ENOMEM; -- 1.7.10.4
next prev parent reply other threads:[~2013-02-16 2:25 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-02-16 2:25 GIT PULL] Renesas ARM-based SoC pinmux for v3.9 #2 Simon Horman 2013-02-16 2:25 ` Simon Horman 2013-02-16 2:25 ` Simon Horman [this message] 2013-02-16 2:25 ` [PATCH] sh-pfc: sh_pfc_probe() sizeof() fix Simon Horman 2013-02-16 10:34 ` GIT PULL] Renesas ARM-based SoC pinmux for v3.9 #2 Arnd Bergmann 2013-02-16 10:34 ` Arnd Bergmann 2013-02-18 0:58 ` Olof Johansson 2013-02-18 0:58 ` Olof Johansson -- strict thread matches above, loose matches on Subject: below -- 2013-02-14 12:23 [PATCH] sh-pfc: sh_pfc_probe() sizeof() fix Magnus Damm 2013-02-14 12:26 ` Laurent Pinchart 2013-02-14 12:27 ` Magnus Damm 2013-02-14 12:27 ` Laurent Pinchart 2013-02-14 15:56 ` Simon Horman 2013-02-15 1:47 ` Magnus Damm 2013-02-15 19:46 ` Linus Walleij 2013-02-16 6:14 ` Simon Horman
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=1360981553-11414-2-git-send-email-horms+renesas@verge.net.au \ --to=horms+renesas@verge.net.au \ --cc=linux-arm-kernel@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.