A sufficient condition for the compactness of a linear integral transformation in a Lebesgue space