In this talk we present a rigorous error analysis of a structure-preserving finite volume method for the compressible viscous magnetohydrodynamic flows. The proposed method inherently preserves the divergence-free constraint on the magnetic field. We analyze the stability and consistency of the finite volume method. Utilizing the relative energy we derive a priori error estimates between finite volume solutions and the strong solution.