diff
+#define MVM_NULL_CHECK(mvm) \
+    do { \
+        if (!mvm) { \
+            pr_err("%s: mvm is NULL\n", __func__); \
+            return -EINVAL; \
+        } \
+    } while (0)
+
 int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id)
 {
+    MVM_NULL_CHECK(mvm);
     int ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
     lockdep_assert_held(&mvm->mutex);
