builddevice: fix missing piece of code