From: Cezary Rojewski Date: Wed, 3 Jun 2026 08:58:24 +0000 (+0200) Subject: ASoC: Intel: catpt: Simplify catpt_stream_find() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f40e7873cd85604ab36a7facf3a5a675ff0d2e67;p=thirdparty%2Flinux.git ASoC: Intel: catpt: Simplify catpt_stream_find() Code line reduction and more transparent variable naming. No functional changes. Reviewed-by: Andy Shevchenko Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20260603085827.1964796-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c index 7b2bab12c707..ba0c75f4b4e7 100644 --- a/sound/soc/intel/catpt/pcm.c +++ b/sound/soc/intel/catpt/pcm.c @@ -99,19 +99,15 @@ catpt_get_stream_template(struct snd_pcm_substream *substream) } /* Caller responsible for holding ->stream_mutex. */ -struct catpt_stream_runtime * -catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id) +struct catpt_stream_runtime *catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id) { - struct catpt_stream_runtime *pos, *result = NULL; + struct catpt_stream_runtime *stream; - list_for_each_entry(pos, &cdev->stream_list, node) { - if (pos->info.stream_hw_id == stream_hw_id) { - result = pos; - break; - } - } + list_for_each_entry(stream, &cdev->stream_list, node) + if (stream->info.stream_hw_id == stream_hw_id) + return stream; - return result; + return NULL; } /* Caller responsible for holding ->stream_mutex. */