From 837d417fc1d08194a9637c67997d9eb6a7703644 Mon Sep 17 00:00:00 2001
From: Andreas Gnau <andreas.gnau@iopsys.eu>
Date: Fri, 1 Sep 2023 13:37:53 +0200
Subject: [PATCH] bcmkernel: bcm_git: Require WiFi patch script to exist

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
---
 bcmkernel/scripts/bcm_git.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bcmkernel/scripts/bcm_git.sh b/bcmkernel/scripts/bcm_git.sh
index a9506ed..44ea620 100755
--- a/bcmkernel/scripts/bcm_git.sh
+++ b/bcmkernel/scripts/bcm_git.sh
@@ -195,15 +195,15 @@ import_module()
         rm -f $repo/git_tmp/INSTALL-src-wifi.txt
         # move the files
         rsync -a "$repo/git_tmp/" "$repo/bcm963xx/"
-        # sometimes they also include patches
+        #  They also include patches which are applied using a script
         local apply_bsp_patch_script="$repo/bcm963xx/dopatch"  # new patch script from 5.04L.04
         if [ -x "$apply_bsp_patch_script" ]; then
             echo "Applying bsp-patches using script $(basename "$apply_bsp_patch_script")"
             (cd "$(dirname "$apply_bsp_patch_script")" && "./$(basename "$apply_bsp_patch_script")" apply)
         else
-            echo "No bsp-patches script $apply_bsp_patch_script found."
+            echo "Error: No bsp-patches script $apply_bsp_patch_script found."
+            return 1
         fi
-
         ;;
     wifi_src-*)
         # The new wifi src packages from 5.04L.03 onwards will only contain the impl src files for the
-- 
GitLab