From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 2/2] watchdog: i.MX: check requested mem region in imx_wd_probe()
Date: Thu, 31 Jul 2014 19:11:32 +0400 [thread overview]
Message-ID: <1406819492-9923-2-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1406819492-9923-1-git-send-email-antonynpavlov@gmail.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/watchdog/imxwd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
index 63c5605..31c3d0d 100644
--- a/drivers/watchdog/imxwd.c
+++ b/drivers/watchdog/imxwd.c
@@ -159,6 +159,10 @@ static int imx_wd_probe(struct device_d *dev)
priv = xzalloc(sizeof(struct imx_wd));
priv->base = dev_request_mem_region(dev, 0);
+ if (!priv->base) {
+ dev_err(dev, "could not get memory region\n");
+ return -ENODEV;
+ }
priv->set_timeout = fn;
priv->wd.set_timeout = imx_watchdog_set_timeout;
priv->dev = dev;
--
2.0.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2014-07-31 15:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 15:11 [PATCH v2 1/2] watchdog: add minimal jz4740 driver Antony Pavlov
2014-07-31 15:11 ` Antony Pavlov [this message]
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=1406819492-9923-2-git-send-email-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.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