From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>,
Dan Williams <dan.j.williams@intel.com>,
Mikael Pettersson <mikpe@it.uu.se>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking
Date: Tue, 18 Mar 2014 10:58:33 +0100 [thread overview]
Message-ID: <1625450.oZua1OVhNs@amdc1032> (raw)
devm_ioremap_resource() returns a pointer to the remapped memory or
an ERR_PTR() encoded error code on failure. Fix the check inside
iop3xx_gpio_probe() accordingly.
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
Compile tested only.
drivers/gpio/gpio-iop.c | 2 ++
1 file changed, 2 insertions(+)
Index: b/drivers/gpio/gpio-iop.c
===================================================================
--- a/drivers/gpio/gpio-iop.c 2014-03-14 16:45:08.152724313 +0100
+++ b/drivers/gpio/gpio-iop.c 2014-03-18 10:50:01.903194680 +0100
@@ -111,6 +111,8 @@ static int iop3xx_gpio_probe(struct plat
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
return gpiochip_add(&iop3xx_chip);
}
next reply other threads:[~2014-03-18 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 9:58 Bartlomiej Zolnierkiewicz [this message]
2014-03-19 1:57 ` [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking Alexandre Courbot
2014-03-19 16:58 ` Dan Williams
2014-03-25 14:04 ` 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=1625450.oZua1OVhNs@amdc1032 \
--to=b.zolnierkie@samsung.com \
--cc=aaro.koskinen@iki.fi \
--cc=dan.j.williams@intel.com \
--cc=gnurou@gmail.com \
--cc=kernel@wantstofly.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
/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