[PATCH 5.10 173/317] stm class: Fix a double free in stm_register_device()