diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-11 21:56:42 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-02-22 15:29:05 +0100 |
commit | 75f8f5af0c2b633352baabd288eff419eb921106 (patch) | |
tree | 4c7e814b0137e782fc3618d976e51a49a6cc8e92 /drivers/gpio/gpio-intel-mid.c | |
parent | gpio: tegra: Convert to use DEFINE_SHOW_ATTRIBUTE macro (diff) | |
download | linux-75f8f5af0c2b633352baabd288eff419eb921106.tar.xz linux-75f8f5af0c2b633352baabd288eff419eb921106.zip |
gpio-intel-mid: Delete an error message
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-intel-mid.c')
-rw-r--r-- | drivers/gpio/gpio-intel-mid.c | 4 |
1 files changed, 1 insertions, 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); |