[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1472045527.5335.46.camel@pengutronix.de>
Date: Wed, 24 Aug 2016 15:32:07 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 2/2] reset: uniphier: use of_device_get_match_data() to
get matched data
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
Powered by blists - more mailing lists