Home mortgage interest deduction when file tax return in two states

Can I deduct the same California home mortgage interest in the itemized deductions in two different states where I filed taxes. I am retired and live in California. I am reporting taxes in California as my primary residency state. I receive deferred compensation from my old company in New York State where I use to work.  Therefore the deferred compensation is from the New York source and I need to file NY tax return. Turbo Tax put the same home mortgage interest for my house in California in both California and New York State itemized deduction. Is it correct that I get to deduct the mortgage interest in both states? Thanks for your help.