A light-emitting element driving device configured to drive a first light source including at least one light-emitting element and a second light source including at least one light-emitting element and connected in series with the first light source when the first light source is not short-circuited and drive the second light source when the first light source is short-circuited, and comprising an output capacitor, a short-circuiting path connected in parallel with the first light source, a variable resistor, and a controller configured to control a resistance value of the variable resistor according to a voltage across a resistor (Rs) connected in series with the first and second light source, wherein the variable resistor is provided in the short-circuiting path, wherein the output capacitor is connected in parallel with a series circuit including the first light source, the second light source, and the resistor (Rs), wherein the controller includes an error amplifier (4, 11) and a constant-voltage source, characterised in that - the light-emitting element driving device further comprises a switch, - the switch is provided in the short-circuiting path, and is configured to switch between a state where the short-circuiting path is in a conducting state and a state where the short-circuiting path is in a cut-off state according to a gate signal (G3, S3), wherein the gate signal is a signal fed by a microprocessor or a camera module, - the variable resistor and the switch are a same element, and - -a voltage across the resistor (Rs) is corrected by a constant voltage output from the constant-voltage source and is then fed to the error amplifier, and - -the error amplifier (4, 11) is configured to enable and disable operation of generating an error signal according to a signal from outside the light-emitting element driving device. drive a first light source including at least one light-emitting element and a second light source including at least one light-emitting element and connected in series with the first light source when the first light source is not short-circuited and drive the second light source when the first light source is short-circuited, and comprising an output capacitor, a short-circuiting path connected in parallel with the first light source, a variable resistor, and a controller configured to control a resistance value of the variable resistor according to a voltage across a resistor (Rs) connected in series with the first and second light source, wherein the variable resistor is provided in the short-circuiting path, wherein the output capacitor is connected in parallel with a series circuit including the first light source, the second light source, and the resistor (Rs), wherein the controller includes an error amplifier (4, 11) and a constant-voltage source, characterised in that - the light-emitting element driving device further comprises a switch, - the switch is provided in the short-circuiting path, and is configured to switch between a state where the short-circuiting path is in a conducting state and a state where the short-circuiting path is in a cut-off state according to a gate signal (G3, S3), wherein the gate signal is a signal fed by a microprocessor or a camera module, - the variable resistor and the switch are a same element, and - -a voltage across the resistor (Rs) is corrected by a constant voltage output from the constant-voltage source and is then fed to the error amplifier, and - -the error amplifier (4, 11) is configured to enable and disable operation of generating an error signal according to a signal from outside the light-emitting element driving device. - the light-emitting element driving device further comprises a switch, - the switch is provided in the short-circuiting path, and is configured to switch between a state where the short-circuiting path is in a conducting state and a state where the short-circuiting path is in a cut-off state according to a gate signal (G3, S3), wherein the gate signal is a signal fed by a microprocessor or a camera module, - the variable resistor and the switch are a same element, and - -a voltage across the resistor (Rs) is corrected by a constant voltage output from the constant-voltage source and is then fed to the error amplifier, and - -the error amplifier (4, 11) is configured to enable and disable operation of generating an error signal according to a signal from outside the light-emitting element driving device.