[RFC 1/3] ASoC: simple-card: Do not print "parse error" twice

Fabio Forni posted 3 patches 3 weeks, 5 days ago
[RFC 1/3] ASoC: simple-card: Do not print "parse error" twice
Posted by Fabio Forni 3 weeks, 5 days ago
If an error occurred on line 747, we'd print "parse error" and then go
to the `err` label, where we print the same message.
Let's remove the duplicated print.

Signed-off-by: Fabio Forni <development@redaril.me>
---
 sound/soc/generic/simple-card.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 5af6d1b308f2..8d36cbbfca1d 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -745,10 +745,8 @@ static int simple_probe(struct platform_device *pdev)
 	if (np && of_device_is_available(np)) {
 
 		ret = simple_parse_of(priv, li);
-		if (ret < 0) {
-			dev_err_probe(dev, ret, "parse error\n");
+		if (ret < 0)
 			goto err;
-		}
 
 	} else {
 		struct simple_util_info *cinfo;
-- 
2.52.0
Re: [RFC 1/3] ASoC: simple-card: Do not print "parse error" twice
Posted by Kuninori Morimoto 3 weeks, 5 days ago
Hi Fabio

Thank you for your patch

> If an error occurred on line 747, we'd print "parse error" and then go
> to the `err` label, where we print the same message.
> Let's remove the duplicated print.
> 
> Signed-off-by: Fabio Forni <development@redaril.me>
> ---

I think this patch effect will be removed/freshed by [3/3] patch anyway ?
Same comment to [2/3] patch

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Re: [RFC 1/3] ASoC: simple-card: Do not print "parse error" twice
Posted by Fabio 3 weeks, 5 days ago
Thank you for your fast review, Kuninori!

> I think this patch effect will be removed/freshed by [3/3] patch anyway ?
> Same comment to [2/3] patch

Yes, definitely. I kept my commit history to document my flow of thought and to address specific problems.
At this point I'll just squash #1 and #2 into one commit in v2.