yes it might work , but i forget to mention the problems of regenrative braking , which might happen when you order the motor to stop , the excess current will do throw the diode which MUST be place the motor in reverse direction and the switching power supply cannot deal with this power . offcourse you can solve this by using an RC , or RCD snubber across the motor instead of the diode alone .
the problem is small is the motor is small (low current 0.5 to 1A) if motor is bigger the current will cause bigger problem.
anyway hope taht helps , try it it is easy and we will learn from your mistake !
cheers