All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.4.y] ASoC: simple-card: Fix misleading error message
@ 2018-02-05  3:11 Nhan Nguyen
  2018-02-05 17:53 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Nhan Nguyen @ 2018-02-05  3:11 UTC (permalink / raw)
  To: greg
  Cc: yasushi.onishi.xc, binh.nguyen.uw, thongsyho, stable,
	Julian Scheel, Mark Brown

From: thongsyho <thong.ho.px@rvc.renesas.com>

commit 7ac45d1635a4cd2e99a4b11903d4a2815ca1b27b upstream.

In case cpu could not be found the error message would always refer to
/codec/ not being found in DT. Fix this by catching the cpu node not found
case explicitly.

Cc: stable@vger.kernel.org
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: thongsyho <thong.ho.px@rvc.renesas.com>
---
 sound/soc/generic/simple-card.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index ff6fcd9..0b1b6fc 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -343,13 +343,19 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
 	snprintf(prop, sizeof(prop), "%scpu", prefix);
 	cpu = of_get_child_by_name(node, prop);
 
+	if (!cpu) {
+		ret = -EINVAL;
+		dev_err(dev, "%s: Can't find %s DT node\n", __func__, prop);
+		goto dai_link_of_err;
+	}
+
 	snprintf(prop, sizeof(prop), "%splat", prefix);
 	plat = of_get_child_by_name(node, prop);
 
 	snprintf(prop, sizeof(prop), "%scodec", prefix);
 	codec = of_get_child_by_name(node, prop);
 
-	if (!cpu || !codec) {
+	if (!codec) {
 		ret = -EINVAL;
 		dev_err(dev, "%s: Can't find %s DT node\n", __func__, prop);
 		goto dai_link_of_err;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.4.y] ASoC: simple-card: Fix misleading error message
  2018-02-05  3:11 [PATCH 4.4.y] ASoC: simple-card: Fix misleading error message Nhan Nguyen
@ 2018-02-05 17:53 ` Greg KH
  2018-02-06  6:30   ` Nhan Ngoc. Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2018-02-05 17:53 UTC (permalink / raw)
  To: Nhan Nguyen
  Cc: yasushi.onishi.xc, binh.nguyen.uw, thongsyho, stable,
	Julian Scheel, Mark Brown

On Mon, Feb 05, 2018 at 10:11:35AM +0700, Nhan Nguyen wrote:
> From: thongsyho <thong.ho.px@rvc.renesas.com>

That author is not the author of:

> commit 7ac45d1635a4cd2e99a4b11903d4a2815ca1b27b upstream.

^ that commit :(

> In case cpu could not be found the error message would always refer to
> /codec/ not being found in DT. Fix this by catching the cpu node not found
> case explicitly.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Julian Scheel <julian@jusst.de>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: thongsyho <thong.ho.px@rvc.renesas.com>

As you are forwarding these patches on to me, I need your signed-off-by
as well on these patches.

Also, I have no idea what order these should all be applied in.  Please
fix the above issues, and resend this series, and the series for the 4.9
kernel tree, as a numbered patch series so I have a hint as to what
order to apply them.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.4.y] ASoC: simple-card: Fix misleading error message
  2018-02-05 17:53 ` Greg KH
@ 2018-02-06  6:30   ` Nhan Ngoc. Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Nhan Ngoc. Nguyen @ 2018-02-06  6:30 UTC (permalink / raw)
  To: Greg KH
  Cc: yasushi.onishi.xc, binh.nguyen.uw, thongsyho, stable,
	Julian Scheel, Mark Brown

On 2/6/2018 12:53 AM, Greg KH wrote:
> On Mon, Feb 05, 2018 at 10:11:35AM +0700, Nhan Nguyen wrote:
>> From: thongsyho <thong.ho.px@rvc.renesas.com>
> That author is not the author of:
>
>> commit 7ac45d1635a4cd2e99a4b11903d4a2815ca1b27b upstream.
> ^ that commit :(
>
>> In case cpu could not be found the error message would always refer to
>> /codec/ not being found in DT. Fix this by catching the cpu node not found
>> case explicitly.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Julian Scheel <julian@jusst.de>
>> Signed-off-by: Mark Brown <broonie@kernel.org>
>> Signed-off-by: thongsyho <thong.ho.px@rvc.renesas.com>
> As you are forwarding these patches on to me, I need your signed-off-by
> as well on these patches.
>
> Also, I have no idea what order these should all be applied in.  Please
> fix the above issues, and resend this series, and the series for the 4.9
> kernel tree, as a numbered patch series so I have a hint as to what
> order to apply them.
>
> thanks,
>
> greg k-h
>
Hello Greg,

I see. Thank for your comments!
I'll resend new patch files.

Regards,
Nhan Ng

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-06  6:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05  3:11 [PATCH 4.4.y] ASoC: simple-card: Fix misleading error message Nhan Nguyen
2018-02-05 17:53 ` Greg KH
2018-02-06  6:30   ` Nhan Ngoc. Nguyen

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.