Opinion
McKINSTER, J.This is an appeal by Steven Ebbert Hughes, appellant and defendant (defendant), from the judgment entered after a jury found him guilty of cultivating marijuana in violation of Health and Safety Code section 11358 (count 1); possession of marijuana for sale in violation of Health and Safety Code section 11359 (count 2); and transportation of less than 28.5 grams of marijuana in violation of Health and Safety Code section 11360, subdivision (b), a lesser included offense to the charged violation of subdivision (a) of Health and Safety Code section 11360 (count 3). The trial court granted probation to defendant a condition of which prohibited defendant from using medical marijuana.
Defendant raises three claims of error in this appeal, the first two of which involve jury instructions, and the third of which challenges the validity of the probation term prohibiting his use of medical marijuana. We conclude defendant’s claims are meritless and therefore we will affirm.
FACTS
The charges in this case stem from a traffic stop on May 15, 2008, in which Riverside County Sheriff’s Deputy Timothy Mohr stopped defendant because the registration had expired on the truck defendant was driving. Deputy Daniel Cline also participated in the traffic stop, although it is not entirely clear from the record when he became involved. At the very least, once it was determined that defendant’s vehicle registration had been expired for more than six months, Deputy Cline was involved in inventorying the vehicle’s contents so that it could be impounded.1
*1476In the course of that inventory, Deputy Cline found two large plastic bins behind the passenger seat. The bins contained 38 small marijuana plants that ranged in height from six to eight inches. At some point, apparently before Deputy Cline had actually looked inside the truck, defendant told the deputies that he had his “work” in the vehicle and that he needed to deliver it to the Los Angeles or Valencia area. Defendant apparently clarified that he had medical marijuana he was delivering to a collective in the Los Angeles area and that he had the paperwork in the truck that allowed him to have the marijuana. According to Deputy Mohr’s trial testimony, defendant got upset when Deputy Cline put the marijuana plants on the tailgate of defendant’s truck. Defendant said the heat would ruin the plants and that would cost defendant $400 of income.
Deputy Cline found a green folder or binder in the map pocket behind the driver’s seat. The folder contained defendant’s medical marijuana physician’s statement, along with various other papers that all included handwritten notations. At trial, Investigator Ken Thurm, a Riverside County Deputy Sheriff assigned to the Special Investigations Bureau and the case investigator, testified that the papers and handwritten notations looked like “a sales call sheet. [][] [‘]I called this person back. This person is not interested. Yes, this person would like some clones.[’] ”
Investigator Thurm also testified that he spoke with defendant over the telephone and defendant told him he had intended to trade the marijuana he had in his truck for finished usable marijuana that he uses to medicate himself. Defendant said the plants are clones, which are grown from female plants. The investigator confirmed that defendant is a patient of Dr. Weiss, who wrote the medical marijuana authorization that was found among the papers in defendant’s truck. Investigator Thurm also expressed the opinion, based on all the evidence gathered in the case and the number of plants, that the marijuana found in defendant’s truck was possessed for sale. Although defendant said he traded the clone marijuana plants at collectives,2 Investigator Thurm expressed the opinion that defendant derived income from the plants. In Thurm’s view, if defendant has plants he could grow them himself: “Instead of planting these and yielding his own medication, he is constantly selling them, passing them off, getting an income.”
Defendant did not testify at trial. Instead he presented the testimony of Dr. Dean Weiss, who confirmed that he had examined defendant and approved his use of medical marijuana for the treatment of pain. A second witness, Christopher Conrad, testified as an expert on medical marijuana use and cultivation. Conrad expressed the opinion that possession of 38 marijuana *1477plants is consistent with personal use by a person with a physician’s authorization for medical use of marijuana.
DISCUSSION
As previously noted defendant’s first two claims of error involve the trial court’s failure to give certain jury instructions. We first address those claims.
1.
INSTRUCTIONAL ERROR CLAIMS*
2.
PROBATION CONDITION PROHIBITING MARIJUANA USE
The trial court granted formal probation to defendant for a period of three years, on condition, among others, that he serve 120 days in county jail, and that he not possess or use medical marijuana “even if prescribed by a physician.” Defendant objected to imposition of that probation condition on the ground that his medical use of marijuana is lawful under Health and Safety Code section 11362.5 et seq., the Compassionate Use Act of 1996 (CUA), which permits marijuana use when prescribed by a physician.
The pertinent facts are that the probation officer recommended in his sentencing report that the trial court prohibit defendant from “possessing and using marijuana, medicinally or otherwise” as a condition of defendant’s probation. At the sentencing hearing the trial court asked defendant his “position” on the probation condition that he abstain from the use of medical marijuana. Defense counsel responded that the condition would be appropriate for someone using their “license” to sell dope on the street. Defendant’s case, his attorney argued, is “completely and entirely different.” Defense counsel reminded the trial court that defendant’s doctor testified at trial, and that defendant, who “certainly is a user of medical marijuana,” is “trying his best to stay within the bounds of the law.”
The trial court expressed concern about the adequacy of the evaluation defendant’s doctor conducted, as reflected in the doctor’s trial testimony. In *1478the trial court’s view, the physician conducted “the most cursory medical evaluation that one could possibly have which is pretty much asking a few questions to the defendant and not doing any type of real physical examination, blood work, anything of that nature—not that [defendant] may have been dishonest with the doctor, but it seems to me that even the most routine physical checkup would require that something else would have occurred.” The trial court added, “And that gives the Court at least the initial belief that what’s happening here is that [defendant] was simply trading in, if you will, his marijuana for marijuana that he could use, perhaps, at an alarming rate, addictive rate, and a rate that wasn’t going to assist him or help him; maybe it would and maybe it wouldn’t, but it is certainly—may not be exactly on point with Brooks.”5 “But it seems to the Court that what was happening— and there [were] no safeguards no protections, nothing that would prevent [defendant] from going to a medical marijuana facility, taking all his plants, as much as he could, and using as much marijuana—and the evaluation of this man by that doctor was akin to saying, ‘What’s wrong with you?’ ‘I’ve got these injuries. I’ve had these past injuries.’ No examination of medical records, no blood tests, no work-up, nothing, and then prescribing him unlimited use of marijuana.”
When defense counsel suggested that the trial court could fashion a condition of probation that defendant be examined by a different doctor to obtain a prescription for medical marijuana, the trial court responded, “Well, that’s what I intend to do. I intend to follow the recommendation of the Probation Department. And for [defendant’s] use of marijuana . . . that order and that term and condition of probation will be done without prejudice. He can petition this Court for modification of his probation provided that he has a licensed doctor in California and that he has the doctor provide a report to the Court as to what examination is [sic] he done, all these things that he’s examined, and why he feels that marijuana is the only viable treatment plan that is available, and the Court will consider that.”
Four and half months after the sentencing hearing and a week after defendant was released from custody, he petitioned the trial court to modify the probation term. The trial court referred defendant’s request to the probation department. At a subsequent hearing, the trial court followed the probation officer’s recommendation and denied defendant’s request. In doing so the trial court stated, “In six months—again, you’re going to have to have it documented. You’re going to have to have physicians look at you, examine you, possibly prescribe other alternative sources of medication for you, see if that can in some way accommodate your medical needs. If it can’t, then *1479your attorney’s instructed to put this matter back on calendar . . . .” After defense counsel pointed out that defendant had provided the court with a statement and recommendation from a doctor who had recently examined defendant, the trial court explained that it was modifying its original request for additional information based on the recommendation of the probation department.6
Defendant contends in this appeal that the condition of probation is unlawful and in any event an abuse of the trial court’s discretion. We disagree.
A. Standard of Review
A trial court has broad, but not unlimited, discretion in setting the terms and conditions of probation. (Pen. Code, § 1203.1; People v. Carbajal (1995) 10 Cal.4th 1114, 1121 [43 Cal.Rptr.2d 681, 899 P.2d 67]; People v. Welch (1993) 5 Cal.4th 228, 233 [19 Cal.Rptr.2d 520, 851 P.2d 802].) On appeal, we review the trial court’s exercise of that discretion under the abuse of discretion standard. “A condition of probation will not be held invalid unless it ‘(1) has no relationship to the crime of which the offender was convicted, (2) relates to conduct which is not in itself criminal, and (3) requires or forbids conduct which is not reasonably related to future criminality .. . .’ [Citation.]” (People v. Lent (1975) 15 Cal.3d 481, 486 [124 Cal.Rptr. 905, 541 P.2d 545], fn. omitted, overruled on other grounds in People v. Wheeler (1992) 4 Cal.4th 284, 290-292 [14 Cal.Rptr.2d 418, 841 P.2d 938].) All three factors must be present for a condition of probation to be invalid. (People v. Wardlow (1991) 227 Cal.App.3d 360, 366 [278 Cal.Rptr. 1].) Furthermore, “[i]nsofar as a probation condition serves the statutory purpose of ‘reformation and rehabilitation of the probationer,’ [citation] it necessarily follows that such a condition is ‘reasonably related to future criminality’ and thus may not be held invalid whether or not it has any ‘relationship to the crime of which the offender was convicted.’ ” (People v. Balestra (1999) 76 Cal.App.4th 57, 65 [90 Cal.Rptr.2d 77].) A trial court does not abuse its discretion unless its determination is arbitrary or capricious or “ ‘ “exceeds the bounds of reason, all of the circumstances being considered.” ’ ” (People v. Welch, supra, 5 Cal.4th at p. 234.)
B. Analysis
The probation condition at issue here relates to otherwise legal conduct because the medical use of marijuana has been legal in California since 1996 when the electorate passed Proposition 215, the CUA, codified as *1480Health and Safety Code section 11362.5.7 Under subdivision (d) of that section, neither possession of marijuana in violation of section 11357 nor cultivation of marijuana in violation of section 11358 “shall . . . apply to a patient, or to a patient’s primary caregiver, who possesses or cultivates marijuana for the personal medical purposes of the patient upon the written or oral recommendation or approval of a physician.”
Nevertheless, appellate courts have affirmed probation terms that prohibit the medical use of marijuana. (See People v. Bianco, supra, 93 Cal.App.4th 748; People v. Moret (2009) 180 Cal.App.4th 839 [104 Cal.Rptr.3d 1] (Moret); People v. Brooks, supra, 182 Cal.App.4th 1348 (Brooks).) Both Moret and Brooks rely in part on section 11362.795 which states: “(a)(1) Any criminal defendant who is eligible to use marijuana pursuant to Section 11362.5 may request that the court confirm that he or she is allowed to use medical marijuana while he or she is on probation or released on bail. [][] (2) The court’s decision and the reasons for the decision shall be stated on the record and an entry stating those reasons shall be made in the minutes of the court.” The court in Moret concluded, “The only reasonable interpretation of section 11362.795(a) is that a trial court has discretion to impose a no-marijuana-use probation condition on the holder of a medical marijuana card.” (Moret, at p. 853.) Similarly, the Brooks court noted, “There would be no reason for the Legislature to speak of the court’s ‘decision’ or to require the court to state reasons for its decision on the record if the court had no discretion to prohibit the use of medical marijuana.” (Brooks, at p. 1352, fn. omitted.)
Section 11362.795, as the Brooks court pointed out, is not part of the CUA; it is part of the medical marijuana program (MMP) enacted in 2003 by the Legislature (§ 11362.7 et seq.). (Brooks, supra, 182 Cal.App.4th at p. 1352.) The state Supreme Court held in People v. Kelly (2010) 47 Cal.4th 1008 [103 Cal.Rptr.3d 733, 222 P.3d 186], decided after Moret, that a provision in the MMP that sets specific quantity limitations for possession and cultivation of medical marijuana impermissibly amends the CUA, which does not include such restrictions. (Kelly, at p. 1012.) Kelly does not involve a no-medical-use-of-marijuana probation condition, but as the Brooks court noted, there is nothing in that decision “that would invalidate the probation provisions of section 11362.795, subdivision (a).” (Brooks, at p. 1352.)
We too conclude that the only reasonable interpretation of section 11362.795, subdivision (a) is that it authorizes a trial court to impose a condition of probation that prohibits a defendant from the use of medical marijuana. The question we must resolve, which was not addressed in either *1481Moret or Brooks, is whether in this case the condition prohibiting defendant from using medical marijuana is invalid because it “ ‘(1) has no relationship to the crime of which the offender was convicted, (2) relates to conduct which is not in itself criminal, and (3) requires or forbids conduct which is not reasonably related to future criminality . . . .’ [Citation.]” (People v. Lent, supra, 15 Cal.3d at p. 486, fn. omitted.)
The probation term prohibiting defendant from possessing marijuana even for medical use has a relationship to the crimes of which defendant was convicted, namely cultivating marijuana, possessing marijuana for sale, and transporting marijuana. In addition, the probation term forbids conduct that is reasonably related to future criminality in that defendant purported to rely on the CUA to justify his possession of the marijuana plants he was transporting to sell in Los Angeles. Consequently, even though possession of marijuana for medical use is not conduct that is unlawful, the trial court nevertheless could prohibit such possession as a condition of defendant’s probation. (People v. Lent, supra, 15 Cal.3d at p. 486.)
In reaching this conclusion, we note the trial court incorrectly focused on whether defendant had a need to use medical marijuana, as suggested by the trial court’s skepticism about the thoroughness of the medical exam conducted by the doctor who authorized defendant’s use of marijuana. The trial court also apparently questioned the palliative efficacy of marijuana and apparently believed that marijuana is not the only medication that could resolve defendant’s ailments and pain. In addition, the trial court was concerned that because defendant’s medical authorization does not limit the amount of marijuana defendant can use he might become addicted. The trial court’s concerns effectively question the wisdom of allowing marijuana to be used for medicinal purposes. That issue was resolved in 1996 when voters of this state passed the CUA. Although the trial court’s focus was wrong, we affirm the result because the task of an appellate court is to “review the correctness of the challenged ruling, not of the analysis used to reach it.” (In re Baraka H. (1992) 6 Cal.App.4th 1039, 1045 [8 Cal.Rptr.2d 221].) “ ‘ “If right upon any theory of the law applicable to the case, it must be sustained regardless of the considerations which may have moved the trial court to its conclusion.” [Citation.]’ ” (People v. Zapien (1993) 4 Cal.4th 929, 976 [17 Cal.Rptr.2d 122, 846 P.2d 704].)
Accordingly, we conclude it was not an abuse of discretion for the trial court to impose the condition of probation that prohibits defendant from possessing marijuana, even for medical use.
*1482DISPOSITION
The judgment is affirmed.
Ramirez, P. J., and Codrington, J., concurred.
A petition for a rehearing was denied February 21, 2012, and appellant’s petition for review by the Supreme Court was denied April 18, 2012, S200687. Kennard, J., was of the opinion that the petition should be granted.
Vehicle Code section 22651, subdivision (d)(1)(A), then and currently in effect, authorizes a peace officer to impound a vehicle when, among other things, the vehicle is operated on the highway “[w]ith a registration expiration date in excess of six months before the date it is . . . operated on the highway.”
A collective, according to Investigator Thurm, is a group of medical marijuana patients who come together to grow marijuana.
See footnote, ante, page 1473.
The probation officer cited People v. Bianco (2001) 93 Cal.App.4th 748 [113 Cal.Rptr.2d 392] and People v. Brooks (2010) 182 Cal.App.4th 1348 [107 Cal.Rptr.3d 501], as authority for the probation condition.
The probation department’s recommendation is not included in the record on appeal.
All further statutory references are to the Health and Safety Code unless indicated otherwise.