if the diode was put in series with the supply and the device on one lead, it would protect it far better but there would be a small voltage drop across the diode.