mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
ASoC: loongson: fix error release
[ Upstream commit97688a9c5b
] 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:d24028606e
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
886ea81de4
commit
f606b9ac4a
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user