Upper critical field and Fulde-Ferrell-Larkin-Ovchinnikov state in CeCoIn5