From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
SF Markus Elfring <elfring@users.sourceforge.net>
Subject: Re: [PATCH 3/5] ASoC: sam9x5_wm8731: Return -ENODEV when probe does not find OF node
Date: Mon, 15 Jan 2018 10:22:48 +0100 [thread overview]
Message-ID: <20180115092248.GT2678@piout.net> (raw)
In-Reply-To: <20180115091114.GB23273@lenoch>
On 15/01/2018 at 10:11:14 +0100, Ladislav Michl wrote:
> On Mon, Jan 15, 2018 at 09:20:25AM +0100, Alexandre Belloni wrote:
> > On 15/01/2018 at 08:53:51 +0100, Ladislav Michl wrote:
> > > Probe should fail with -ENODEV when called with NULL pdev->dev.of_node.
> > >
> > > Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> > > ---
> > > sound/soc/atmel/sam9x5_wm8731.c | 6 ++----
> > > 1 file changed, 2 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c
> > > index e6c303ab869d..9db08826b32a 100644
> > > --- a/sound/soc/atmel/sam9x5_wm8731.c
> > > +++ b/sound/soc/atmel/sam9x5_wm8731.c
> > > @@ -84,10 +84,8 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev)
> > > struct sam9x5_drvdata *priv;
> > > int ret;
> > >
> > > - if (!np) {
> > > - dev_err(&pdev->dev, "No device node supplied\n");
> > > - return -EINVAL;
> > > - }
> > > + if (!np)
> > > + return -ENODEV;
> > >
> >
> > This will never happen, you may as well just remove the test.
>
> Ah, right, this is DT only driver. And the same for the patch 5.
>
> Btw, all that drivers seems to be for development boards, so what
> about moving to simple card instead? (and let these special drivers
> die silently)
>
Yes, that would be good, I'm all for it. However, I think some custom
boards are using those drivers and are not upstream and will also need
to be migrated or at least have a proper migration path.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2018-01-15 9:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 7:52 [PATCH 0/5] ASoC: (minor) atmel cleanup Ladislav Michl
2018-01-15 7:52 ` [PATCH 1/5] ASoC: sam9g20_wm8731: use dev_*() logging functions Ladislav Michl
2018-01-22 12:26 ` Applied "ASoC: sam9g20_wm8731: use dev_*() logging functions" to the asoc tree Mark Brown
2018-01-15 7:53 ` [PATCH 2/5] ASoC: sam9x5_wm8731: Drop 'ASoC' prefix from error messages Ladislav Michl
2018-01-22 12:26 ` Applied "ASoC: sam9x5_wm8731: Drop 'ASoC' prefix from error messages" to the asoc tree Mark Brown
2018-01-15 7:53 ` [PATCH 3/5] ASoC: sam9x5_wm8731: Return -ENODEV when probe does not find OF node Ladislav Michl
2018-01-15 8:20 ` Alexandre Belloni
2018-01-15 9:11 ` Ladislav Michl
2018-01-15 9:22 ` Alexandre Belloni [this message]
2018-01-15 7:54 ` [PATCH 4/5] ASoC: sam9x5_wm8731: Fix OF node reference counting Ladislav Michl
2018-01-15 8:46 ` Alexandre Belloni
2018-01-15 9:08 ` Ladislav Michl
2018-01-15 7:54 ` [PATCH 5/5] ASoC: atmel_wm8904: Return -ENODEV when probe does not find OF node Ladislav Michl
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=20180115092248.GT2678@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=elfring@users.sourceforge.net \
--cc=ladis@linux-mips.org \
--cc=lgirdwood@gmail.com \
--cc=nicolas.ferre@microchip.com \
--cc=tiwai@suse.com \
/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