projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
568dc2f
)
ASoC: loongson: fix error release
author
tangbin
<tangbin@cmss.chinamobile.com>
Tue, 3 Sep 2024 09:06:20 +0000
(17:06 +0800)
committer
Mark Brown
<broonie@kernel.org>
Tue, 3 Sep 2024 20:23:59 +0000
(21:23 +0100)
In function loongson_card_parse_of(), when get device_node
'codec' failed, the function of_node_put(codec) should not
be invoked, thus fix error release.
Fixes:
d24028606e76
("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
Link:
https://patch.msgid.link/20240903090620.6276-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/loongson/loongson_card.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/loongson/loongson_card.c
b/sound/soc/loongson/loongson_card.c
index fae5e9312bf08c9dd576023933856aff2ce97ab5..2c8dbdba27c5f8e2f915385129ef82ee0fe35602 100644
(file)
--- a/
sound/soc/loongson/loongson_card.c
+++ b/
sound/soc/loongson/loongson_card.c
@@
-127,8
+127,8
@@
static int loongson_card_parse_of(struct loongson_card_data *data)
codec = of_get_child_by_name(dev->of_node, "codec");
if (!codec) {
dev_err(dev, "audio-codec property missing or invalid\n");
-
ret = -EINVAL
;
-
goto err
;
+
of_node_put(cpu)
;
+
return -EINVAL
;
}
for (i = 0; i < card->num_links; i++) {