[PATCH v8 08/19] iommufd: Move putting a hwpt to a helper function