[PATCH v4 08/17] iommufd: Move putting a hwpt to a helper function