device: fix use-after-free
device: fix use-after-free

galek/crown,galek/crown,mikymod/crown,taylor001/crown,taylor001/crown,galek/crown,dbartolini/crown,mikymod/crown,dbartolini/crown,dbartolini/crown,mikymod/crown,taylor001/crown,dbartolini/crown,galek/crown,mikymod/crown,taylor001/crown