From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] reset: uniphier: use of_device_get_match_data() to get matched data
Date: Wed, 24 Aug 2016 15:32:07 +0200 [thread overview]
Message-ID: <1472045527.5335.46.camel@pengutronix.de> (raw)
In-Reply-To: <CAK7LNASCtZNMdSO33z5K1jPac_DPTnt3aUaC+CCNrrUdm_hq9w@mail.gmail.com>
Am Mittwoch, den 24.08.2016, 21:29 +0900 schrieb Masahiro Yamada:
[...]
> >> @@ -285,6 +286,45 @@ static const struct reset_control_ops uniphier_reset_ops = {
> >> .status = uniphier_reset_status,
> >> };
> >>
> >> +static int uniphier_reset_probe(struct platform_device *pdev)
> >> +{
> >> + struct device *dev = &pdev->dev;
> >> + struct uniphier_reset_priv *priv;
> >> + const struct uniphier_reset_data *p, *data;
> >> + struct regmap *regmap;
> >> + struct device_node *parent;
> >> + unsigned int nr_resets = 0;
> >> +
> >> + data = of_device_get_match_data(dev);
> >> + WARN_ON(!data);
> >
> > I know right now this can't happen anyway, but you did return -EINVAL
> > here before. Maybe use:
> >
> > if (WARN_ON(!data))
> > return -EINVAL;
> >
> > instead? I can fix it up if you agree.
>
> I agree.
>
> Please fix it up. Thanks!
Ok, done.
regards
Philipp
prev parent reply other threads:[~2016-08-24 13:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 6:40 [PATCH 0/2] reset: uniphier: follow-up fix, clean-up Masahiro Yamada
2016-08-24 6:40 ` [PATCH 1/2] reset: uniphier: add static qualifier to probe function Masahiro Yamada
2016-08-24 12:26 ` Philipp Zabel
2016-08-24 6:40 ` [PATCH 2/2] reset: uniphier: use of_device_get_match_data() to get matched data Masahiro Yamada
2016-08-24 12:27 ` Philipp Zabel
2016-08-24 12:29 ` Masahiro Yamada
2016-08-24 13:32 ` Philipp Zabel [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=1472045527.5335.46.camel@pengutronix.de \
--to=p.zabel@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).