Our checks for an invalid fence stride forgot to guard against
zero stride on gen4+. Fix it.
v2: Avoid duplicated code (danvet)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
                }
        }
 
+       if (stride < tile_width)
+               return false;
+
        /* 965+ just needs multiples of tile width */
        if (INTEL_INFO(dev)->gen >= 4) {
                if (stride & (tile_width - 1))
        }
 
        /* Pre-965 needs power of two tile widths */
-       if (stride < tile_width)
-               return false;
-
        if (stride & (stride - 1))
                return false;