[Intel-gfx] [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through

Jani Nikula jani.nikula at intel.com
Mon Oct 3 14:20:31 UTC 2016


Only try removing snd_hda_intel if it's actually loaded, and let the
errors through to the logs if removal fails. This is a clue if i915
removal fails later.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 tests/drv_module_reload_basic | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index 4f3172788eca..a221d65f725a 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -32,7 +32,9 @@ function reload() {
 	# The sound driver uses our power well
 	pkill alsactl
 	snd_hda_intel_unloaded=0
-	rmmod snd_hda_intel &> /dev/null && snd_hda_intel_unloaded=1
+	if mod_loaded snd_hda_intel; then
+		rmmod snd_hda_intel && snd_hda_intel_unloaded=1
+	fi
 
 	#ignore errors in ips - gen5 only
 	rmmod intel_ips &> /dev/null
-- 
2.1.4



More information about the Intel-gfx mailing list