From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] watchdog: Add DA906x PMIC watchdog driver.
Date: Fri, 15 Aug 2014 10:51:05 +0200 [thread overview]
Message-ID: <20140815085105.GH17027@pengutronix.de> (raw)
In-Reply-To: <53ECD85A.8050903@roeck-us.net>
On Thu, Aug 14, 2014 at 08:40:10AM -0700, Guenter Roeck wrote:
> On 08/14/2014 02:57 AM, Markus Pargmann wrote:
>
> >>>+
> >>>+static int da9063_wdt_probe(struct platform_device *pdev)
> >>>+{
> >>>+ int ret;
> >>>+ struct da9063 *da9063 = dev_get_drvdata(pdev->dev.parent);
> >>>+ struct da9063_watchdog *wdt;
> >>>+
> >>>+ if (!da9063)
> >>>+ return -EPROBE_DEFER;
> >>
> >>Can this ever happen ? Isn't this driver instantiated from its parent,
> >>which would ensure that the parent's driver data is set ?
> >
> >No this can't happen. I replaced it with BUG_ON and also introduced a
> >BUG_ON check for dev.parent.
> >
> That is a bit too much. You should only use BUG_ON if the kernel can not
> continue to run, which should not be the case here. I would suggest
> to return -ENODEV.
Okay, thanks.
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140815/9dfe2659/attachment.sig>
prev parent reply other threads:[~2014-08-15 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 10:46 [PATCH v3] watchdog: Add DA906x PMIC watchdog driver Markus Pargmann
2014-08-13 10:50 ` Markus Pargmann
2014-08-14 5:26 ` Guenter Roeck
2014-08-14 9:57 ` Markus Pargmann
2014-08-14 15:40 ` Guenter Roeck
2014-08-15 8:51 ` Markus Pargmann [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=20140815085105.GH17027@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).