Hello Bernadette,
I couldn't see a death for a John Farrell on the Register of Deaths at Sea that matched your description.
The record for John Farrell on the Pliny, just in case he's your John :
Ship - Pliny, Official No. 78776, Date of Arrival (in UK port) - 24/12/1878, Date of death - 8/10/1878, Age - 30, Rank - AB Seaman, Place of Birth - Ireland, Last abode - Blank, Cause of death - drowning.
Only one other drowning (same date) on the Pliny, presumably in a storm, and it did arrive in a UK port.
Another death of a John Farrell whose age matches better, but the rest doesn't match :
Ship - Lualaba, Official No. 78613, Date of Arrival (in UK port) 29/12/1880, Date of death - 23/10/1880, Age - 40, Rank - AB Seaman, Place of Birth - Toronto, Last abode - Blank, Cause of death - Bronchitis.
Alan.