In this article, we investigate the stability of flowing fluid in a horizontal cavity. The walls of which consists of a porous material under the influence of a magnetic field (MF) perpendicular to the cavity plane. We find that the real part of the wave velocity is negative for any value of the Hartmann number and the Ghratshof number is greater than zero. In addition, we convert the governing equations to non-dimensional formulas. So, we obtain that Reynolds number, wave number (k), Hartmann number , Ghratshof number, and Darcy number affect on the stability of the model through the graphs of these numbers.