[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Ve+Yifx4YO2Fbn+Ui4pGPpx0xSutSVjLVN9nVq6aOQyjg@mail.gmail.com>
Date: Tue, 13 Feb 2018 20:45:45 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
David Cohen <david.a.cohen@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] gpio-intel-mid: Delete an error message for a failed
memory allocation in intel_gpio_probe()
On Sun, Feb 11, 2018 at 11:04 PM, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sun, 11 Feb 2018 21:56:42 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
Linus, same comment as previously.
If you are OK with the change, take my
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> drivers/gpio/gpio-intel-mid.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-intel-mid.c b/drivers/gpio/gpio-intel-mid.c
> index 629575ea46a0..028d64c2cb1e 100644
> --- a/drivers/gpio/gpio-intel-mid.c
> +++ b/drivers/gpio/gpio-intel-mid.c
> @@ -361,10 +361,8 @@ static int intel_gpio_probe(struct pci_dev *pdev,
> pcim_iounmap_regions(pdev, 1 << 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->reg_base = pcim_iomap_table(pdev)[0];
> priv->chip.label = dev_name(&pdev->dev);
> --
> 2.16.1
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists