[][mt76-vendor: fix coverity errors]

[Description]
Fix some coverity errors for mt76-vendor.

[Release-log]
N/A

Change-Id: Iccc74680df03762d1997a6684a109227aed2b27b
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5059083
diff --git a/feed/mt76-vendor/src/capi.c b/feed/mt76-vendor/src/capi.c
index e86a9e1..91efbd8 100644
--- a/feed/mt76-vendor/src/capi.c
+++ b/feed/mt76-vendor/src/capi.c
@@ -8,8 +8,10 @@
 	char *val;
 
 	val = strchr(argv[0], '=');
-	if (val)
-		*(val++) = 0;
+	if (!val)
+		return -EINVAL;
+
+	*(val++) = 0;
 
 	if (!strncmp(argv[0], "he_gi", 5)) {
 		nla_put_u8(msg, MTK_VENDOR_ATTR_RFEATURE_CTRL_HE_GI, strtoul(val, NULL, 0));
@@ -65,8 +67,10 @@
 	char *val;
 
 	val = strchr(argv[0], '=');
-	if (val)
-		*(val++) = 0;
+	if (!val)
+		return -EINVAL;
+
+	*(val++) = 0;
 
 	if (!strncmp(argv[0], "fixed_mcs", 9)) {
 		nla_put_u8(msg, MTK_VENDOR_ATTR_WIRELESS_CTRL_FIXED_MCS, strtoul(val, NULL, 0));