]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: topology: Fix redundant logical jump
authorTang Bin <tangbin@cmss.chinamobile.com>
Sun, 8 Sep 2024 14:02:59 +0000 (22:02 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 13 Sep 2024 18:40:38 +0000 (19:40 +0100)
In the function soc_tplg_dai_config, the logical jump
of 'goto err' is redundant, so remove it.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240908140259.3859-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c

index af5d42b57be7eb5c7c228a601e3387d23081a147..af3158cdc8d54a08029487842b13284bf3a98e92 100644 (file)
@@ -1894,7 +1894,7 @@ static int soc_tplg_dai_config(struct soc_tplg *tplg,
                caps = &d->caps[SND_SOC_TPLG_STREAM_PLAYBACK];
                ret = set_stream_info(tplg, stream, caps);
                if (ret < 0)
-                       goto err;
+                       return ret;
        }
 
        if (d->capture) {
@@ -1902,7 +1902,7 @@ static int soc_tplg_dai_config(struct soc_tplg *tplg,
                caps = &d->caps[SND_SOC_TPLG_STREAM_CAPTURE];
                ret = set_stream_info(tplg, stream, caps);
                if (ret < 0)
-                       goto err;
+                       return ret;
        }
 
        if (d->flag_mask)
@@ -1914,13 +1914,10 @@ static int soc_tplg_dai_config(struct soc_tplg *tplg,
        ret = soc_tplg_dai_load(tplg, dai_drv, NULL, dai);
        if (ret < 0) {
                dev_err(tplg->dev, "ASoC: DAI loading failed\n");
-               goto err;
+               return ret;
        }
 
        return 0;
-
-err:
-       return ret;
 }
 
 /* load physical DAI elements */