ASoC: fsl: mpc8610: remove useless assignment
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 19 Feb 2021 23:29:36 +0000 (17:29 -0600)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 13:06:42 +0000 (13:06 +0000)
cppcheck warning:

sound/soc/fsl/mpc8610_hpcd.c:333:6: style: Redundant initialization
for 'ret'. The initialized value is overwritten before it is
read. [redundantInitialization]
 ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma",
     ^
sound/soc/fsl/mpc8610_hpcd.c:193:10: note: ret is initialized
 int ret = -ENODEV;
         ^
sound/soc/fsl/mpc8610_hpcd.c:333:6: note: ret is overwritten
 ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma",
     ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210219232937.6440-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/mpc8610_hpcd.c

index eccc833..58b9ca3 100644 (file)
@@ -190,7 +190,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
        struct device_node *codec_np = NULL;
        struct mpc8610_hpcd_data *machine_data;
        struct snd_soc_dai_link_component *comp;
-       int ret = -ENODEV;
+       int ret;
        const char *sprop;
        const u32 *iprop;