(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

ASoC: soc-card-test: Check return value of kunit_device_register()

Call to kunit_device_register() can fail. Check return result of register call. While at it introduce helper variable so that if it fails put_device is called on properly initialized variable. Fixes: ef7784e41db7 ("ASoC: soc-card: Add KUnit test case for snd_soc_card_get_kcontrol") Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> Link: https://patch.msgid.link/20261014200608.118770-5-amade@asmblr.net Signed-off-by: Mark Brown <broonie@kernel.org>


Author Amadeusz Sławiński Committer Mark Brown Date Commit Parent 1641c1ba
+5 -2
1 changed file
+5 -2
1 changed file