The Caribbean Princess cruise ship returned to its port a day early after more than 170 people were affected by illness.