From: Cezary Rojewski Date: Fri, 5 Apr 2024 09:09:25 +0000 (+0200) Subject: ASoC: Intel: avs: Remove dead code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d58275f474b4a27b4e97839ffe8d9fe55c0cc40a;p=linux.git ASoC: Intel: avs: Remove dead code The result of list_next_entry()/list_last_entry() is never null. Signed-off-by: Cezary Rojewski Link: https://msgid.link/r/20240405090929.1184068-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/avs/path.c b/sound/soc/intel/avs/path.c index 8dfd90587427f..fa3fec339548c 100644 --- a/sound/soc/intel/avs/path.c +++ b/sound/soc/intel/avs/path.c @@ -709,8 +709,6 @@ static int avs_path_pipeline_arm(struct avs_dev *adev, /* bind current module to next module on list */ source = mod; sink = list_next_entry(mod, node); - if (!source || !sink) - return -EINVAL; ret = avs_ipc_bind(adev, source->module_id, source->instance_id, sink->module_id, sink->instance_id, 0, 0);