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