
168 Cal.App.3d 731 (1985)
214 Cal. Rptr. 322
THE PEOPLE, Plaintiff and Respondent,
v.
LEO ALLEN BARBARICK, Defendant and Appellant.
Docket No. E000852.
Court of Appeals of California, Fourth District, Division Two.
May 23, 1985.
*733 COUNSEL
Jill M. Bojarski, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Keith I. Motley and Roberta L. Woodrick, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
MORRIS, P.J.
Defendant Leo Allen Barbarick pleaded guilty to a misdemeanor violation of Health and Safety Code section 11357, subdivision (c), for possession of marijuana. He was given a six-month suspended sentence and placed on six months probation.
On appeal defendant contends the trial court erred in denying his motion to suppress the evidence seized (marijuana plants) pursuant to a warrantless search. More specifically, defendant contends that the search was based on an illegal search condition of his own recognizance release pending appeal of another conviction; that the search constituted an unreasonable invasion of privacy and was not subject to the plain view exception; that the good faith exception was inapplicable; and that the search condition did not include the garden area in which the marijuana plants were found.

I.

FACTS
In 1982, defendant was convicted of misdemeanor possession of concentrated cannabis (Health & Saf. Code, § 11357, subd. (a)), defendant refused probation and was sentenced to serve six months in the county jail. Execution of the judgment was stayed pending appeal, and defendant was released on his own recognizance (OR) upon the condition, among others, *734 that he "... submit to search of his person, automobile, garage or home for the purpose of detection of narcotics, dangerous drugs or marijuana by a Probation Officer or any other Law Enforcement Officer." Defendant stated that he accepted the conditions of his OR release.
Thereafter, on September 7, 1982, two police officers drove to defendant's residence to serve him with papers in a civil matter. As they drove up to the west, or rear side of defendant's house, and stopped, one of the officers observed defendant looking out a rear window of the house, and then heard a loud bang come from the house. The two officers parked and walked around to the east, or front side of defendant's house. As they came around the corner, they saw defendant rushing out of a garden-greenhouse area about 30 feet away, and separated from the house by a small dirt yard and alley. Defendant hurried past the officers back into the house; a sprinkler system came on in the garden-greenhouse, and defendant, appearing nervous, returned to where the officers were standing in the dirt yard. The officers detected the smell of burning marijuana coming from the house.
While one of the officers served defendant with the civil papers, the other, his suspicions aroused and knowing of the search condition, walked back to the entrance of the garden-greenhouse. Scanning the garden the officer observed an uprooted marijuana plant laying underneath a vegetable plant. After asking defendant to turn off the water, the officer walked around the outside of the garden until he was adjacent to the marijuana plant, which he then picked up and examined. Taking a few more steps, the officer observed a group of growing marijuana plants in a cleared-out spot in the midst of thick foliage. Finally, the officer found another group of growing marijuana plants in another cleared-out area at the end of a small pathway that led into the thick foliage. Defendant was arrested.
Defendant moved to suppress the evidence of the marijuana plants pursuant to Penal Code section 1538.5. The trial court ruled that the marijuana plants were not in plain view and that the search was unreasonable unless justified by the search condition of defendant's OR release. The court held the search condition of the OR release to be invalid, but found that the search condition included the garden area, and that defendant's acquiescence to the search condition vitiated his reasonable expectation of privacy. The motion to suppress was denied.
The trial court issued a certificate of probable cause and this appeal followed.


*735 II.

DISCUSSION
We agree with the trial court that the condition requiring defendant to submit to searches was not a valid condition of defendant's release upon his own recognizance. (1) (See fn. 1.) We hold, however, that the good faith exception to the exclusionary rule, as articulated by the United States Supreme Court subsequent to the decision of the trial court, is applicable. (See United States v. Leon (1984) 468 U.S. 897 [82 L.Ed.2d 677, 104 S.Ct. 3405].)[1]

Impropriety of Search Condition
(2) In setting the amount of bail or other conditions of release, the primary issue, before or after conviction, is whether the detainee will appear for subsequent court proceedings. (In re Podesto (1976) 15 Cal.3d 921, 934 [127 Cal. Rptr. 97, 544 P.2d 1297], citing In re Brumback (1956) 46 Cal.2d 810, 813 [299 P.2d 217].) The statutory provisions on bail and OR release, which refer to "appearance bond[s]," "imposition of ... conditions ... necessary to assure the defendant's appearance" (Pen. Code, § 1269d), and the like (see, e.g., Pen. Code, §§ 1268a, 1269, 1269b, 1269c, 1270, 1270.1, 1273, 1275, 1289, 1305, 1310, 1318, 1318.1, 1320) are consistent with this conclusion. Indeed, whether the defendant will subsequently appear is the sole issue at preconviction OR release hearings. (Van Atta v. Scott (1980) 27 Cal.3d 424, 438 [166 Cal. Rptr. 149, 613 P.2d 210].) Accordingly, the "... court's discretion to impose conditions upon [a preconviction] OR release is limited to conditions which are reasonably related to and attempt to insure subsequent court appearances." (McIntosh v. Municipal Court (1981) 124 Cal. App.3d 1083, 1085 [177 Cal. Rptr. 683].)
Plaintiff relies on People v. Sylvestry (1980) 112 Cal. App.3d Supp. 1 [169 Cal. Rptr. 575] to support the contention that the condition was reasonably related to securing future court appearances by defendant. This reliance is misplaced. In Sylvestry the defendant was charged with using or being under the influence of an opiate pursuant to Health and Safety Code section 11550. (People v. Sylvestry, supra, at p. Supp. 3.) The court allowed an OR release, but only upon the condition that the defendant stay in a drug rehabilitation center. The court was to be notified within 24 hours if the defendant left the program. (Id., at p. Supp. 5.) The court in McIntosh v. Superior *736 Court, supra, 124 Cal. App.3d at page 1086, later described this condition as "... reasonably related to future court appearances by a defendant who uses drugs."
In contrast to Sylvestry, the OR condition here, that defendant, while pursuing his appeal, "... submit to search of his person, automobile, garage or home for the purpose of detection of narcotics, dangerous drugs or marijuana by a Probation Officer or any other Law Enforcement Officer," was not reasonably related to securing defendant's subsequent appearance. (See McIntosh v. Superior Court, supra, 124 Cal. App.3d at p. 1085.) Defendant was convicted of possession of concentrated cannabis. We disagree with the plaintiff that from this "... it might reasonably be assumed that he would [ingest] the drug, become intoxicated and fail to meet his court appearance requirements," and that "[t]he search condition would then serve to deter such conduct on [defendant's] part and help to ensure his future court appearances." The record is absent of any showing that defendant personally used cannabis, a derivative of marijuana, or that he had missed court appearances, because of cannabis intoxication or otherwise. The number of inferences plaintiff's argument requires is inconsistent with the standard that an OR condition be reasonably related to securing defendant's later appearance. (See id.)
As above stated, for both preconviction and postconviction releases, the primary purpose of release conditions is to help insure subsequent appearances by the defendant. (In re Podesto, supra, 15 Cal.3d at p. 934; In re Underwood (1973) 9 Cal.3d 345, 348 [107 Cal. Rptr. 401, 508 P.2d 721].) However, plaintiff correctly notes that another factor the court may consider in deciding whether to release a convicted felon on bail is the danger to the community, or, in other words, whether there is any danger that, if released, defendant will continue to commit crime. (In re Pipinos (1982) 33 Cal.3d 189, 200 [187 Cal. Rptr. 730, 654 P.2d 1257, 28 A.L.R.4th 205]; In re Podesto, supra, at p. 935; In re Scaggs (1956) 47 Cal.2d 416, 419 [303 P.2d 1009].)
We decline to apply the danger to the community reasoning to the instant case. Because defendant was convicted of only a misdemeanor, he had an absolute statutory right to a bail release. (Pen. Code, § 1272.) The discretion to admit bail or grant an OR release "`is not ... an arbitrary discretion to do abstract justice according to the popular meaning of that phrase, but is a discretion governed by legal rules to do justice according to law....'" (In re Podesto, supra, 15 Cal.3d at p. 933, quoting Ex Parte Hoge (1874) 48 Cal. 3, 5.) Plaintiff cites no cases, nor have we discovered any, that grant a judge discretion to add a search condition to a misdemeanor OR release merely because the judge is concerned that defendant will continue *737 to engage in criminal conduct. (Cf. In re Pipinos, supra, 33 Cal.3d at p. 200.) Considerable questions exist concerning the ability of courts to predict future conduct (In re Underwood, supra, 9 Cal.3d at p. 349, fn. 5); thus, the Supreme Court has urged caution in this regard (In re Podesto, supra, at p. 936).
Moreover, the fact that the trial judge was willing to release defendant on probation for his misdemeanor offense, and ultimately sentenced him to only six months, significantly undermines the danger to the community theory. In In re Pipinos, supra, 33 Cal.3d at page 200, footnote 11, the Supreme Court stated that "[t]he probation report's recommendation of one year in county jail also seems to negate a finding of danger to the community." The court formed this conclusion despite the fact that the defendant was "... convicted by a jury of five offenses dealing with controlled substances: one count of conspiracy to transport or furnish controlled substances (Pen. Code, § 182; Health & Saf. Code, § 11379), and four counts of possession of controlled substances for sale (Health & Saf. Code, § 11378)" (id., at p. 193), and sentenced by the trial judge to a prison term of four years (id., at p. 194). The Supreme Court also recognized in In re Podesto, supra, 15 Cal.3d at pages 932-933 that "... the Legislature may ... have determined that misdemeanants do not pose a danger to the community comparable to that of particular felons, ..."

Good Faith Reliance on Judicial Search Condition
(3a) Defendant contends that the seizure of the marijuana plants constituted an unconstitutional search and seizure, and therefore that the plants should have been suppressed or excluded as evidence. To the contrary, we hold that the good faith exception enunciated by the United States Supreme Court in United States v. Leon, supra, 468 U.S. 897 [82 L.Ed.2d 677] is applicable to the instant case.
(4) At the threshold, whether evidence is subject to exclusion because of an illegal search and seizure must be determined pursuant to the Fourth Amendment of the federal Constitution; the state Constitution no longer affords independent grounds for suppression of evidence for crimes occurring after June 6, 1982, the effective date of Proposition 8. (People v. Helmquist (1984) 161 Cal. App.3d 609, 612 [207 Cal. Rptr. 718]; see Cal. Const., art. I, § 28, subd. (d); People v. Chavers (1983) 33 Cal.3d 462, 467 [189 Cal. Rptr. 169, 658 P.2d 96]; People v. Daan (1984) 161 *738 Cal. App.3d 22, 28-31 [207 Cal. Rptr. 228].) Here the crime and search in question occurred on September 7, 1982.[2]
Moreover, Leon, which was decided in 1984, has been held to apply retroactively. (People v. MacAvoy (1984) 162 Cal. App.3d 746, 759-760 [209 Cal. Rptr. 34]; People v. Helmquist, supra, 161 Cal. App.3d at p. 616.) We agree with the reasoning of these decisions.
In United States v. Leon, supra, 468 U.S. at pp. ___-___ [82 L.Ed.2d at pp. 684-686], the Supreme Court considered the following facts. A state superior court judge had erroneously determined that an affidavit established probable cause to search for marijuana, and issued a facially valid search warrant. Probable cause was lacking because the reliability and credibility of the informant was not established, the information he provided was five months old, and thus stale, and the corroborating details were inadequate.
The decision in Leon was whether or not to exclude evidence seized by police pursuant to the warrant. In essence, the Supreme Court held that the exclusionary rule should not be applied when an officer conducting a search objectively acts in good faith based on a warrant issued by a detached and neutral magistrate that subsequently is determined to be invalid. (Id., 468 U.S. at pp. ___-___ [82 L.Ed.2d at pp. 686-687].)
The Supreme Court reached this holding after balancing the cost, release of criminals, against the benefit, deterrence of unlawful official conduct, of the exclusionary rule. (Id., 468 U.S. at pp. ___-___ [82 L.Ed.2d at pp. 688-698].) In the court's terms: "`[A]ny rule of evidence that denies the jury access to clearly probative and reliable evidence must bear a heavy burden of justification, and must be carefully limited to the circumstances in which it will pay its way by deterring official lawlessness.' Illinois v. Gates, 462 U.S. at 213, 76 L.Ed.2d 527, 103 S.Ct. 2317 (White, J., concurring in the judgment). Because we find that the [exclusionary] rule can have no substantial *739 deterrent effect in the sorts of situations under consideration in this case, ... we conclude that it cannot pay its way in those situations." (Id., 468 U.S. at pp. ___-___ [82 L.Ed.2d at pp. 688-689, fn. 6].)
The court elaborated on this conclusion. "First, the exclusionary rule is designed to deter police misconduct rather than to punish the errors of judges and magistrates. Second, there exists no evidence suggesting that judges and magistrates are inclined to ignore or subvert the Fourth Amendment or that lawlessness among these actors requires application of the extreme sanction of exclusion." (Id., 468 U.S. at p. ___ [82 L.Ed.2d at p. 694], fn. omitted.) "`[T]he detached scrutiny of a neutral magistrate ... is a more reliable safeguard against improper searches than the hurried judgment of a law enforcement officer "engaged in the often competitive enterprise of ferreting out crime"' United States v. Chadwick, 433 U.S. 1, 9, 53 L.Ed.2d 538, 97 S.Ct. 2476 (1971) (quoting Johnson v. United States, 333 U.S. 10, 14, 92 L.Ed. 436, 68 S.Ct. 367 (1948))." (Id., 468 U.S. at pp. ___-___ [82 L.Ed.2d at pp. 692-693].)
Finally, the Supreme Court stated, "[j]udges and magistrates are not adjuncts to the law enforcement team; as neutral judicial officers, they have no stake in the outcome of particular criminal prosecutions. The threat of exclusion thus cannot be expected significantly to deter them. Imposition of the exclusionary sanction is not necessary meaningfully to inform judicial officers of their errors, and we cannot conclude that admitting evidence obtained pursuant to a warrant while at the same time declaring that the warrant was somehow defective will in any way reduce judicial officers' professional incentive to comply with the Fourth Amendment, [or] encourage them to repeat their mistakes, ..." (Id., 468 U.S. at p. ___ [82 L.Ed.2d at p. 695].)
(3b) We hold that the rationale of Leon is directly applicable to the instant case. Here a detached and neutral magistrate issued a facially valid search condition. As in Leon, the judge made a mistake of law; neither insuring defendant's future court appearance nor protecting the community from danger sufficiently justified the search condition. Although the judge who authorized the search condition made an improper legal determination, again as in Leon he had a substantial basis for doing so and did not act unreasonably. (See id., 468 U.S. at p. ___ [82 L.Ed.2d at p. 693; Illinois v. Gates (1983) 462 U.S. 213, at pp. 238-239 [76 L.Ed.2d 527, at pp. 548-549, 103 S.Ct. 2317].)
It is true, of course, that no search warrant was involved in the instant case. However, the judicial role was similar to that involved in issuing a search warrant. Both here and in Leon the judiciary was weighing state *740 interests against an individual's Fourth Amendment rights. Therefore, we hold Leon applicable to the judicial search condition in this case. (But cf. People v. Ciraolo (1984) 161 Cal. App.3d 1081, 1086, fn. 2 [208 Cal. Rptr. 93].)
Leon also requires good faith police reliance upon the judicial order granting permission to search. The Supreme Court rejected the need for an evaluation of the subjective good faith of the officers; according to the Supreme Court the value of the exclusionary rule is retained if it can be said that the officers objectively acted in good faith. (United States v. Leon, supra, 468 U.S. at p. ___ [82 L.Ed.2d at p. 696, fn. 20].) The objective standard "... requires officers to have a reasonable knowledge of what the law prohibits." (Id.)
There is no reasonable doubt here that the officer acted in good faith reliance upon the search condition. The officer testified that he had read the OR release order of the judge, including the search condition. It is reasonable to assume that the officer did not know the law prohibited the search condition for defendant during his appeal because the case and statutory law on this issue was somewhat ambiguous. Furthermore, search conditions are common and valid for persons on probation. (See People v. Mason (1971) 5 Cal.3d 759, 764 [97 Cal. Rptr. 302, 488 P.2d 630], disapproved on other grounds in People v. Lent (1975) 15 Cal.3d 481, 486, fn. 1 [124 Cal. Rptr. 905, 541 P.2d 545].)
(5) Defendant contends that the garden area search was not of defendant's "person, automobile, garage or home," and thus was not within the parameters of the search condition. The trial judge found that defendant's home included the garden area. We agree with the trial judge that the garden area was part of the home for Fourth Amendment purposes.
The Fourth Amendment provides that: "The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, ..." "The protection afforded by the Fourth Amendment, insofar as houses are concerned, has never been restricted to the interior of the house, but has extended to open areas immediately adjacent thereto." (Wattenberg v. United States (9th Cir.1968) 388 F.2d 853, 857.) Differentiating between the immediate adjacent area and an unprotected open field has generally been analyzed as a problem of determining the extent of the curtilage. (Id.) Wattenberg held that a stockpile of trees in the backyard and within 35 feet of the abode of defendant was within the curtilage. (Id.) The garden area where the marijuana plants were found was 15 to 50 feet from the house. It was partially enclosed by a wood frame with sprinklers overhead. Only a small dirt yard and alley *741 separated it from the house. This constitutes substantial evidence the garden was within the curtilage and thus part of the house or home for Fourth Amendment purposes. (See People v. Redmond (1969) 71 Cal.2d 745, 755 [79 Cal. Rptr. 529, 457 P.2d 321].)[3]

Other Contentions
Given that the police search was conducted in good faith reliance upon judicial authorization thereof, it is unnecessary to consider whether the trial court erred in finding that defendant did not entertain a reasonable expectation of privacy once he agreed to the search condition as part of his OR release.

III.

DISPOSITION
The judgment is affirmed.
Kaufman, J., and McDaniel, J., concurred.
Appellant's petition for review by the Supreme Court was denied August 1, 1985. Bird, C.J., was of the opinion that the petition should be granted.
NOTES
[1]  If the judgment is right on any theory of law applicable to the case, it must be sustained regardless of the considerations which may have moved the trial court. (Conner v. Rose (1963) 219 Cal. App.2d 327, 329 [32 Cal. Rptr. 919]; Barbaria v. Independent Elevator Co. (1956) 139 Cal. App.2d 474, 482 [293 P.2d 855].)
[2]  Nevertheless, California law supports the application of the good faith exception to the instant case. "... California courts have recognized that a reasonable mistake of fact, entertained in good faith by arresting officers, will authorize a search or arrest, even if the facts subsequently prove to be mistaken." (People v. Tellez (1982) 128 Cal. App.3d 876, 880 [180 Cal. Rptr. 579].) Prior to Leon the California Supreme Court left open "... whether under exceptional circumstances an officer's reasonable mistake of law might validate police conduct...." (People v. Teresinski (1982) 30 Cal.3d 822, 831-832 [180 Cal. Rptr. 617, 640 P.2d 753]; but see People v. Tellez, supra.) This opening was seized in People v. Washington (1982) 131 Cal. App.3d 434, 439-440 [186 Cal. Rptr. 3], in which the court held that where the police had mistakenly believed despite contrary law that the defendant was on probation and therefore subject to a search condition, evidence seized pursuant to that condition and upon reasonable (but not probable) cause should not be excluded. These California cases generally add credence to the application of Leon to this case.
[3]  To the extent the garden was outside the curtilage it was an open field, and thus outside the area which defendant should have had a reasonable expectation of privacy and not subject to Fourth Amendment protection. (Wattenberg v. United States, supra, 388 F.2d at p. 857.)
