From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Vincent Stehlé" <vincent.stehle@intel.com>, linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH] pinctrl: intel: merrifield: fix dup size in probe
Date: Wed, 31 Aug 2016 16:54:49 +0300 [thread overview]
Message-ID: <1472651689.4887.412.camel@linux.intel.com> (raw)
In-Reply-To: <20160831123050.13202-1-vincent.stehle@intel.com>
On Wed, 2016-08-31 at 14:30 +0200, Vincent Stehlé wrote:
> In function mrfld_pinctrl_probe(), when duplicating the mrfld_families
> array the requested memory region length is multiplied once too many
> by the
> number of elements in the original array. Fix this to spare some
> memory.
Good catch!
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
P.S. Linus, perhaps this is material for -rc5.
>
> Fixes: 4e80c8f505741cbd ("pinctrl: intel: Add Intel Merrifield pin
> controller support")
> Signed-off-by: Vincent Stehlé <vincent.stehle@intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/pinctrl/intel/pinctrl-merrifield.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/intel/pinctrl-merrifield.c
> b/drivers/pinctrl/intel/pinctrl-merrifield.c
> index 7fb7656..7826c7f 100644
> --- a/drivers/pinctrl/intel/pinctrl-merrifield.c
> +++ b/drivers/pinctrl/intel/pinctrl-merrifield.c
> @@ -854,7 +854,7 @@ static int mrfld_pinctrl_probe(struct
> platform_device *pdev)
> */
> nfamilies = ARRAY_SIZE(mrfld_families),
> families = devm_kmemdup(&pdev->dev, mrfld_families,
> - nfamilies *
> sizeof(mrfld_families),
> + sizeof(mrfld_families),
> GFP_KERNEL);
> if (!families)
> return -ENOMEM;
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-08-31 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 10:49 [PATCH v4 1/1] pinctrl: intel: Add Intel Merrifield pin controller support Andy Shevchenko
2016-06-29 8:01 ` Linus Walleij
2016-08-31 12:30 ` [PATCH] pinctrl: intel: merrifield: fix dup size in probe Vincent Stehlé
2016-08-31 13:54 ` Andy Shevchenko [this message]
2016-09-07 20:00 ` Linus Walleij
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=1472651689.4887.412.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vincent.stehle@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;
as well as URLs for NNTP newsgroup(s).