Section 654 Of Title 16. General Provisions From California Penal Code >> Title 16. >> Part 1.
654
. (a) An act or omission that is punishable in different ways by
different provisions of law shall be punished under the provision
that provides for the longest potential term of imprisonment, but in
no case shall the act or omission be punished under more than one
provision. An acquittal or conviction and sentence under any one bars
a prosecution for the same act or omission under any other.
(b) Notwithstanding subdivision (a), a defendant sentenced
pursuant to subdivision (a) shall not be granted probation if any of
the provisions that would otherwise apply to the defendant prohibits
the granting of probation.