Characterization of symmetric M-matrices as resistive inverses