Nothing is wrong with the code per-se, but I am wondering about you potentiometer - can you give us a schematic or drawing of how you wired it? It shouldn't smoke (baaad)...
As far as speed control is concerned:
Standard R/C servos operate a one speed only; it is possible to send them incremental positioning commands with a delay in-between, but this results (sometimes) in jittery control, and probably not what is expected.
Your sketch you posted is meant to control the position of a servo with a potentiometer, not its speed.
You don't say what you intend to do with the motor once you have its speed control (and you might want to define what an LVDT is - remember, if you ever use acronyms in writing, after the first introduction you should define the acronym, then use the acronym alone thereafter - you get a pass if english isn't your primary language, but isn't this something covered in high school english class?); if you need a gear motor for more torque, a servo can be used, but if you need to control its speed, then you will have to customise it (basically bypassing the window comparator circuit in the servo, and driving the h-bridge directly, and reading the potentiometer that is in the servo with the Arduino, and implementing your own comparator or PID control with speed control; something you won't find built into a servo, unless it is a programmable digital one).
You can hook up a regular DC motor, and use PWM to control a driving transistor or h-bridge (depending on whether you need directional control or not); with PWM, you can vary how fast the motor is turned on-off, effectively changing its speed. There is a PWM example included with the Arduino IDE for varying the brightness of an LED with a potentiometer, I believe - if you ran that output instead to a driver circuit (ie, transistor/darlington or h-bridge input), then that to a DC motor, you would vary the speed with the potentiometer.
It probably wouldn't take that much to then convert over to the LVDT (whatever that is) - Ok, just googled: Linear variable differential transformer? Hmm - you might have your work cut out making that work, but still, it should be possible...
Good luck!
