Commit 84ef2565 authored by Jakob Koschel's avatar Jakob Koschel Committed by Greg Kroah-Hartman
Browse files

staging: greybus: codecs: fix type confusion of list iterator variable



If the list does not exit early then data == NULL and 'module' does not
point to a valid list element.
Using 'module' in such a case is not valid and was therefore removed.

Fixes: 6dd67645 ("greybus: audio: Use single codec driver registration")
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarVaibhav Agarwal <vaibhav.sr@gmail.com>
Reviewed-by: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarJakob Koschel <jakobkoschel@gmail.com>
Link: https://lore.kernel.org/r/20220321123626.3068639-1-jakobkoschel@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c73d320
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -603,8 +603,8 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
		}
	}
	if (!data) {
		dev_err(dai->dev, "%s:%s DATA connection missing\n",
			dai->name, module->name);
		dev_err(dai->dev, "%s DATA connection missing\n",
			dai->name);
		mutex_unlock(&codec->lock);
		return -ENODEV;
	}