correct linked list reverse

correct linked list reverse using head reference pointer