[PATCH v6 3/6] tee: fix put order in teedev_close_context()