ASoC: tegra: Fix coverity issue

Fix the unchecked return error from of_property_read_u32
function.

CID 10162254

Bug 3952896

Change-Id: Ifaa0cfc275e7a70896fd1f41ed12fcffd76395bd
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856343
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mohan Kumar
2023-02-10 14:14:30 +05:30
committed by mobile promotions
parent 60153c77c1
commit b284ab0c11

View File

@@ -2,7 +2,7 @@
/* /*
* tegra_asoc_machine.c - Tegra DAI links parser * tegra_asoc_machine.c - Tegra DAI links parser
* *
* Copyright (c) 2014-2022 NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2014-2023 NVIDIA CORPORATION. All rights reserved.
* *
*/ */
@@ -501,8 +501,10 @@ static int parse_dt_dai_links(struct snd_soc_card *card,
asoc_simple_canonicalize_platform(dai_link->platforms, asoc_simple_canonicalize_platform(dai_link->platforms,
dai_link->cpus); dai_link->cpus);
of_property_read_u32(link_node, "link-type", if (of_property_read_u32(link_node, "link-type",
&link_type); &link_type) < 0)
goto cleanup;
switch (link_type) { switch (link_type) {
case PCM_LINK: case PCM_LINK:
dai_link->ops = pcm_ops; dai_link->ops = pcm_ops;