California Health and Safety Code Section 11365
Under the Health and Safety Code 11365, it is unlawful to visit or be in a place where controlled substances are being smoked or used with knowledge that such activity is occurring. This is another reduced offense when an individual is being charged with a violation of Health and Safety Code Section 11358 (cultivation of marijuana).
This offense can be either a felony or a misdemeanor, and could expose the individual to either probation with up to one year in jail, or prison for 16, 24, or 36 months. Sometimes a prosecutor is willing to work out a plea-bargains where the person must plead guilty to a felony, with the understanding that the sentencing is actually continued for a period of time (usually between 6-18 months), so that the person can be sentenced to a misdemeanor instead of a felony. Usually, the person has to do some program or other requirements imposed by the court, and obey all laws throughout the period of time that sentencing is continued.