/* any vectors left over go for VMDq support */
        if (pf->flags & I40E_FLAG_VMDQ_ENABLED) {
-               int vmdq_vecs_wanted = pf->num_vmdq_vsis * pf->num_vmdq_qps;
-               int vmdq_vecs = min_t(int, vectors_left, vmdq_vecs_wanted);
-
                if (!vectors_left) {
                        pf->num_vmdq_msix = 0;
                        pf->num_vmdq_qps = 0;
                } else {
+                       int vmdq_vecs_wanted =
+                               pf->num_vmdq_vsis * pf->num_vmdq_qps;
+                       int vmdq_vecs =
+                               min_t(int, vectors_left, vmdq_vecs_wanted);
+
                        /* if we're short on vectors for what's desired, we limit
                         * the queues per vmdq.  If this is still more than are
                         * available, the user will need to change the number of
                         * queues/vectors used by the PF later with the ethtool
                         * channels command
                         */
-                       if (vmdq_vecs < vmdq_vecs_wanted)
+                       if (vectors_left < vmdq_vecs_wanted) {
                                pf->num_vmdq_qps = 1;
+                               vmdq_vecs_wanted = pf->num_vmdq_vsis;
+                               vmdq_vecs = min_t(int,
+                                                 vectors_left,
+                                                 vmdq_vecs_wanted);
+                       }
                        pf->num_vmdq_msix = pf->num_vmdq_qps;
 
                        v_budget += vmdq_vecs;