Viscosity criterion for hyperbolic conservation laws