From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
perex-/Fr2/VpizcU@public.gmane.org,
tiwai-l3A5Bk7waGM@public.gmane.org,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH -next] ASoC: tegra20-ac97: fix error return code in tegra20_ac97_platform_probe()
Date: Mon, 16 Dec 2013 10:10:12 -0700 [thread overview]
Message-ID: <52AF33F4.1060203@wwwdotorg.org> (raw)
In-Reply-To: <CAPgLHd8W+vo9FD7tAT3eBM_-akXStB8ib93xTk6oS8+5TTYNAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 12/13/2013 10:15 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>
> Fix to return -ENODEV instead of 0 when no GPIO supplied in
> tegra20_ac97_platform_probe().
> diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
> @@ -358,6 +358,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
> }
> } else {
> dev_err(&pdev->dev, "no codec-reset GPIO supplied\n");
> + ret = -ENODEV;
This would be better as:
ret = ac97->reset_gpio;
Since that will propagate the exact error code (and incidentally,
deferred probe will work correctly then).
> if (!gpio_is_valid(ac97->sync_gpio)) {
> dev_err(&pdev->dev, "no codec-sync GPIO supplied\n");
> + ret = -ENODEV;
Similarly here,
ret = ac97->sync_gpio;
prev parent reply other threads:[~2013-12-16 17:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-14 5:15 [PATCH -next] ASoC: tegra20-ac97: fix error return code in tegra20_ac97_platform_probe() Wei Yongjun
[not found] ` <CAPgLHd8W+vo9FD7tAT3eBM_-akXStB8ib93xTk6oS8+5TTYNAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-16 17:10 ` Stephen Warren [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=52AF33F4.1060203@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=perex-/Fr2/VpizcU@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tiwai-l3A5Bk7waGM@public.gmane.org \
--cc=weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.