]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: SOF: Simplify the calculation of variables
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 12 May 2023 06:42:25 +0000 (14:42 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 15 May 2023 11:14:34 +0000 (20:14 +0900)
./sound/soc/sof/pcm.c:372:27-29: WARNING !A || A && B is equivalent to !A || B.

Reported-by: Abaci Robot <abaci@linux.alibaba.com
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4938
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Link: https://lore.kernel.org/r/20230512064225.75358-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org
sound/soc/sof/pcm.c

index 567db32173a88fc922cfc87b8f5640efa3219e89..d14e7fd2c2ee8a6a51a73a0084ef2b49bf94a28e 100644 (file)
@@ -369,7 +369,7 @@ static int sof_pcm_trigger(struct snd_soc_component *component,
        case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
        case SNDRV_PCM_TRIGGER_STOP:
                /* invoke platform trigger to stop DMA even if pcm_ops isn't set or if it failed */
-               if (!pcm_ops || (pcm_ops && !pcm_ops->platform_stop_during_hw_free))
+               if (!pcm_ops || !pcm_ops->platform_stop_during_hw_free)
                        snd_sof_pcm_platform_trigger(sdev, substream, cmd);
                break;
        default: