drv_module_reload: Don't declare success when failing

We weren't returning straight away when failing to unload the driver, so
the test happilly executed gem_suspend and printed ""module successfully
loaded again".

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Damien Lespiau 2014-07-10 14:03:37 +01:00
parent e16d4a2d68
commit 82e3d3379b

View File

@ -33,10 +33,9 @@ rmmod drm &> /dev/null
if lsmod | grep i915 &> /dev/null ; then if lsmod | grep i915 &> /dev/null ; then
echo WARNING: i915.ko still loaded! echo WARNING: i915.ko still loaded!
exitcode=1 exit 1
else else
echo module successfully unloaded echo module successfully unloaded
exitcode=0
fi fi
modprobe i915 modprobe i915
@ -47,4 +46,4 @@ modprobe snd_hda_intel
# try to run something # try to run something
$SOURCE_DIR/gem_exec_nop > /dev/null && echo "module successfully loaded again" $SOURCE_DIR/gem_exec_nop > /dev/null && echo "module successfully loaded again"
exit $exitcode exit 0