Commit b66a056e authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: Atom: sst_loader: remove always-true condition

Fix cppcheck warning:

sound/soc/intel/atom/sst/sst_loader.c:401:43: style: Redundant
condition: If 'EXPR == 4', the comparison 'EXPR != 3' is always
true. [redundantCondition]

 if (sst_drv_ctx->sst_state !=  SST_RESET ||
                                          ^

In this case, if sst_state == SST_SHUTDOWN then the first test is
already true. 2014 bug, yay.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-10-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent eeb460f2
......@@ -398,8 +398,7 @@ int sst_load_fw(struct intel_sst_drv *sst_drv_ctx)
dev_dbg(sst_drv_ctx->dev, "sst_load_fw\n");
if (sst_drv_ctx->sst_state != SST_RESET ||
sst_drv_ctx->sst_state == SST_SHUTDOWN)
if (sst_drv_ctx->sst_state != SST_RESET)
return -EAGAIN;
if (!sst_drv_ctx->fw_in_mem) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment