a switching power supply includes an energy - storing device , a power switch , a driving circuit and a thermal sensing device . the energy - storing device is coupled to an input power source and controlled by the power switch to increase or decrease the power therein . the power switch has a control terminal connected to the driving circuit for switching . the thermal sensing device is connected to the control terminal of the power switch and powered by the driving circuit . when sensing an operation temperature exceeding a predetermined range , the thermal sensing device disables the driving circuit .