Cal. Civ. Code § 1855
Notwithstanding an agreement respecting the length of time during which a deposit is to continue, it may be terminated by the depositor on paying all that would become due to the depositary in case of the deposit so continuing.