Skip to content

Commit 54b1c80

Browse files
committed
devtools: remove superfluous fallbacks in uAPI script
The option -e was set on the script shebang (first line), so the script will stop if an error is not caught. Hence the explicit return or exit commands in case of error were superfluous and can be removed. Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
1 parent 2159c9d commit 54b1c80

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

devtools/linux-uapi.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ update_headers()
4949
echo "Updating to $version"
5050
for filename in $(find $base_path -name "*.h" -type f); do
5151
header=${filename#$base_path}
52-
download_header $header $filename || return 1
52+
download_header $header $filename
5353
done
5454

5555
return 0
@@ -63,13 +63,13 @@ import_header()
6363

6464
local path="$base_path$header"
6565

66-
download_header $header $path || return 1
66+
download_header $header $path
6767

6868
for include in $(sed -ne 's/^#include <\(.*\)>$/\1/p' $path); do
6969
if [ ! -f "$base_path$include" ]; then
7070
read -p "Import $include (y/n): " import && [ "$import" = 'y' ] || continue
7171
echo "Importing $include for $path"
72-
import_header "$include" || return 1
72+
import_header "$include"
7373
fi
7474
done
7575

@@ -130,19 +130,19 @@ if [ -n "$version" ]; then
130130
echo "Headers already up to date ($current_version >= $version)"
131131
version=$current_version
132132
else
133-
update_headers || exit 1
133+
update_headers
134134
fi
135135
else
136136
echo "Version not specified, using current version ($current_version)"
137137
version=$current_version
138138
fi
139139

140140
if [ -n "$file" ]; then
141-
import_header $file || exit 1
141+
import_header $file
142142
fi
143143

144144
for filename in $(find $base_path -name "*.h" -type f); do
145-
fixup_includes $filename || exit 1
145+
fixup_includes $filename
146146
done
147147

148148
echo $version > $base_path/version
@@ -158,8 +158,8 @@ echo "Checking imported headers for version $version"
158158

159159
for filename in $(find $base_path -name "*.h" -type f); do
160160
header=${filename#$base_path}
161-
download_header $header $tmpheader || exit 1
162-
fixup_includes $tmpheader || exit 1
161+
download_header $header $tmpheader
162+
fixup_includes $tmpheader
163163
check_header $filename $tmpheader || errors=$((errors+1))
164164
done
165165

0 commit comments

Comments
 (0)