motor: tspdrv: Check buffer size before copying

Update from VPUDND8

Change-Id: If7a57f15151074b1d984b51255257116121e5682
Signed-off-by: Luis Cruz <ljc2491@gmail.com>