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