treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / testing / selftests / sparc64 / drivers / drivers_test.sh
blob6d08273b7532f0a183c4c899db5be085f81006e4
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
4 SRC_TREE=../../../../
6 test_run()
8 if [ -f ${SRC_TREE}/drivers/char/adi.ko ]; then
9 insmod ${SRC_TREE}/drivers/char/adi.ko 2> /dev/null
10 if [ $? -ne 0 ]; then
11 rc=1
13 else
14 # Use modprobe dry run to check for missing adi module
15 if ! /sbin/modprobe -q -n adi; then
16 echo "adi: [SKIP]"
17 elif /sbin/modprobe -q adi; then
18 echo "adi: ok"
19 else
20 echo "adi: [FAIL]"
21 rc=1
24 ./adi-test
25 rmmod adi 2> /dev/null
28 rc=0
29 test_run
30 exit $rc