From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-gpio@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] gpio: merrifield: Delete an error message for a failed memory allocation in mrfld_gpio_probe()
Date: Mon, 12 Feb 2018 12:08:23 +0200 [thread overview]
Message-ID: <1518430103.22495.252.camel@linux.intel.com> (raw)
In-Reply-To: <d73420c9-60ee-ab28-e881-299441815afc@users.sourceforge.net>
On Sun, 2018-02-11 at 13:42 +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 11 Feb 2018 13:30:14 +0100
>
> Omit an extra message for a memory allocation failure in this
> function.
>
> This issue was detected by using the Coccinelle software.
>
Linus, I have no strong opinion here, so, up to you to decide.
If you decide this patch to go,
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/gpio/gpio-merrifield.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-
> merrifield.c
> index dd67a31ac337..eec21122299e 100644
> --- a/drivers/gpio/gpio-merrifield.c
> +++ b/drivers/gpio/gpio-merrifield.c
> @@ -408,10 +408,8 @@ static int mrfld_gpio_probe(struct pci_dev *pdev,
> const struct pci_device_id *id
> pcim_iounmap_regions(pdev, BIT(1));
>
> priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
> - if (!priv) {
> - dev_err(&pdev->dev, "can't allocate chip data\n");
> + if (!priv)
> return -ENOMEM;
> - }
>
> priv->dev = &pdev->dev;
> priv->reg_base = pcim_iomap_table(pdev)[0];
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2018-02-12 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-11 12:42 [PATCH] gpio: merrifield: Delete an error message for a failed memory allocation in mrfld_gpio_probe() SF Markus Elfring
2018-02-12 10:08 ` Andy Shevchenko [this message]
2018-02-22 14:19 ` 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=1518430103.22495.252.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).