Where I live if the sub panel is in a ATTACHED garage no main needed - in a DETACHED garage a main is required by ahj