Reconfigurable intelligent surface (RIS) technology is a promising solution to improve the performance of existing wireless communications. To achieve its cost-effectiveness advantage, there inevitably exist certain hardware impairments in the system. Therefore, it is more reasonable to design passive beamforming in this scenario. Some existing research has considered such problems under transceiver impairments. However, their performance still leaves room for improvement, possibly due to their algorithms not properly handling the fractional structure of the objective function. To address this, the passive beamforming is redesigned in this correspondence paper, taking into account both transceiver impairments and the practical phase-shift model. We tackle the fractional structure of the problem by employing the quadratic transform. The remaining sub-problems are addressed utilizing the penalty-based method and the difference-of-convex programming. Since we provide closed-form solutions for all sub-problems, our algorithm is highly efficient. The simulation results demonstrate the superiority of our proposed algorithm.