Variable output LM317 power supply circuit - potentiometer burning
If you adjust the pot. to a 0-ohm setting, your 220R resistor would get force-fed over 4W (30V/220R=~136mA x 30V = ~4.08W) of chip-frying power!

It is recommended to always use a 'minimum value' resistor in series with the pot in a voltage regulator for this reason.

In your above circuit; adding 2 parallel 10K, 0.125W resistors in series with your pot should solve the problem.


Then, with their 5K resistance when the pot is shorted, the pair of 10K resistors would each get ~0.09W.
By time the pot then reached a high enough setting (5K) to start passing them for Vdrop (and thus power dissipated), the circuit resistance (from the 220R resistor to GND through the pot) would be just over 10K, leaving only 3mA of current @ 30V, for a max load (neglecting any flow through the parallel 12K) of 0.09w; low enough to not fry your components anymore.