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