diff
+#define CHECK_MVM_NULL(mvm) do { if (!mvm) return -EINVAL; } while (0)
+
 int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id)
 {
+    CHECK_MVM_NULL(mvm);
     int ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
     lockdep_assert_held(&mvm->mutex);
