The synthesis of computer-generated holograms generally involves quantization of the hologram transmittance or reflectance function. As a consequence the information stored in the hologram is distorted. Using error diffusion for the quantization process allows to minimize the distortion. The relation between the parameters (diffusion coefficients) of the error diffusion system and the resulting distortion is modeled by means of a linear theory. Based on this linear model a method for the optimization of the diffusion coefficients in a least-square sense is presented. A stability parameter is introduced in the determination of the optimal diffusion coefficients in order to prevent unstable behaviour of the resulting error-diffusion system during quantization.