An employer in California is generally unable to make employees pay for the cost of errors. In this state, the theory is that the employer reaps the benefits of employees performing well; therefore, employers should also bear the burdens of employees who make errors. Accordingly, an employer cannot take money from your check. You are correct, however, the employer can discipline you, including possible job loss.
You can file a claim with the Labor Commissioner for the money the employer took from your check due to a mistake.