Reverse polarity protection with diode