create_usbhid.sh: fix shellcheck warnings
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I77a763381c9029d13549f0f1f9ea63407158cb76
diff --git a/create_usbhid.sh b/create_usbhid.sh
index fcde89a..f6085dd 100644
--- a/create_usbhid.sh
+++ b/create_usbhid.sh
@@ -6,7 +6,7 @@
create_hid() {
# create gadget
mkdir "${hid_conf_directory}"
- cd "${hid_conf_directory}" || return
+ cd "${hid_conf_directory}" || exit 1
# add basic information
echo 0x0100 > bcdDevice
@@ -149,7 +149,7 @@
if [ ! -e "${hid_conf_directory}" ]; then
create_hid
else
- cd "${hid_conf_directory}" || exit
+ cd "${hid_conf_directory}" || exit 1
fi
if [ "$1" = "connect" ]; then