MLK-22463-1: ASoC: fsl_easrc: Fix logically dead code
authorShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 26 Aug 2019 07:52:13 +0000 (15:52 +0800)
committerShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 26 Aug 2019 09:12:56 +0000 (17:12 +0800)
Fix logically dead code which is reported by coverity

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
sound/soc/fsl/fsl_easrc.c

index 682bffd..347f257 100644 (file)
@@ -1320,11 +1320,7 @@ static int fsl_easrc_process_format(struct fsl_easrc *easrc,
         * 0b - Signed Format
         * 1b - Unsigned Format
         */
-       ret = snd_pcm_format_unsigned(raw_fmt) > 0 ? 1 : 0;
-       if (ret < 0)
-               return ret;
-
-       fmt->unsign = ret;
+       fmt->unsign = snd_pcm_format_unsigned(raw_fmt) > 0 ? 1 : 0;
 
        return 0;
 }