From: Jing Wang <windsdaemon@gmail.com>
To: Ben Dooks <ben-linux@fluff.org>, Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, Jing Wang <windsdaemon@gmail.com>
Subject: [PATCH] SOC/SAMSUNG: use PTR_ERR to fix the value of return
Date: Wed, 14 Nov 2012 14:52:48 +0800 [thread overview]
Message-ID: <1352875968-23319-1-git-send-email-windsdaemon@gmail.com> (raw)
From: Jing Wang <windsdaemon@gmail.com>
This patch use the macro PTR_ERR to fix the value of the return and change KERN_WARNING to KERN_ERR
Signed-off-by: Jing Wang <windsdaemon@gmail.com>
---
sound/soc/samsung/smdk_spdif.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c
index beaa9c1..4000a63 100644
--- a/sound/soc/samsung/smdk_spdif.c
+++ b/sound/soc/samsung/smdk_spdif.c
@@ -28,32 +28,28 @@ static int set_audio_clock_heirachy(struct platform_device *pdev)
fout_epll = clk_get(NULL, "fout_epll");
if (IS_ERR(fout_epll)) {
- printk(KERN_WARNING "%s: Cannot find fout_epll.\n",
- __func__);
- return -EINVAL;
+ printk(KERN_ERR "%s: Cannot find fout_epll.\n", __func__);
+ return PTR_ERR(fout_epll);
}
mout_epll = clk_get(NULL, "mout_epll");
if (IS_ERR(mout_epll)) {
- printk(KERN_WARNING "%s: Cannot find mout_epll.\n",
- __func__);
- ret = -EINVAL;
+ printk(KERN_ERR "%s: Cannot find mout_epll.\n", __func__);
+ ret = PTR_ERR(mout_epll);
goto out1;
}
sclk_audio0 = clk_get(&pdev->dev, "sclk_audio");
if (IS_ERR(sclk_audio0)) {
- printk(KERN_WARNING "%s: Cannot find sclk_audio.\n",
- __func__);
- ret = -EINVAL;
+ printk(KERN_ERR "%s: Cannot find sclk_audio.\n", __func__);
+ ret = PTR_ERR(sclk_audio0);
goto out2;
}
sclk_spdif = clk_get(NULL, "sclk_spdif");
if (IS_ERR(sclk_spdif)) {
- printk(KERN_WARNING "%s: Cannot find sclk_spdif.\n",
- __func__);
- ret = -EINVAL;
+ printk(KERN_ERR "%s: Cannot find sclk_spdif.\n", __func__);
+ ret = PTR_ERR(sclk_spdif);
goto out3;
}
@@ -85,7 +81,7 @@ static int set_audio_clock_rate(unsigned long epll_rate,
fout_epll = clk_get(NULL, "fout_epll");
if (IS_ERR(fout_epll)) {
printk(KERN_ERR "%s: failed to get fout_epll\n", __func__);
- return -ENOENT;
+ return PTR_ERR(fout_epll);
}
clk_set_rate(fout_epll, epll_rate);
@@ -94,7 +90,7 @@ static int set_audio_clock_rate(unsigned long epll_rate,
sclk_spdif = clk_get(NULL, "sclk_spdif");
if (IS_ERR(sclk_spdif)) {
printk(KERN_ERR "%s: failed to get sclk_spdif\n", __func__);
- return -ENOENT;
+ return PTR_ERR(sclk_spdif);
}
clk_set_rate(sclk_spdif, audio_rate);
--
1.7.9.5
reply other threads:[~2012-11-14 6:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1352875968-23319-1-git-send-email-windsdaemon@gmail.com \
--to=windsdaemon@gmail.com \
--cc=ben-linux@fluff.org \
--cc=kgene.kim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.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.