
65 Cal.2d 523 (1966)
In re IGNACIO V. TERAN on Habeas Corpus.
Crim. No. 10065. 
Supreme Court of California. In Bank.  
Dec. 20, 1966.
 Ignacio V. Teran, in pro. per., and Molly H. Minudri, under appointment by the Supreme Court, for Petitioner.
 Thomas C. Lynch, Attorney General, Albert W. Harris, Jr., Assistant Attorney General, Edward P. O'Brien and Charles W. Rumph, Deputy Attorneys General, for Respondent.
 BURKE, J.
 Ignacio V. Teran, represented by retained counsel, pleaded guilty to possession of heroin (Health & Saf. Code,  11500). In October 1963 he again appeared with counsel, and the court entered a judgment of conviction, found a prior conviction of violating the same section true, and sentenced him to prison. He filed an appeal, but it was dismissed for failure to file an opening brief (rule 17, subd. (a), of Cal. Rules of Court). In 1964 he was again convicted of violating the same section and was sentenced to prison.
 In May 1966, while confined at San Quentin, he filed the instant habeas corpus petition complaining solely of matters relating to the 1963 conviction. He contends that the trial court failed to determine whether he was a proper subject for the narcotics rehabilitation program (see former  6451, Pen. Code),  [fn. 1] that the trial court erroneously denied his motion to withdraw his guilty plea, and that he did not have the effective assistance of counsel in the trial court. According to Teran, these contentions were made in habeas corpus petitions which were filed in or after April 1966 in the Marin County Superior Court and the Court of Appeal and which were denied. He fails to explain the delay of about two years *525 in presenting the contentions. (See In re Swain, 34 Cal.2d 300, 302 [209 P.2d 793].) We issued an order to show cause and appointed counsel to represent him.
 [1a] The claim that the trial court failed to determine whether he was a proper subject for the narcotics rehabilitation program could have been raised on appeal from the judgment of conviction. (Cf. People v. Wallace, 59 Cal.2d 548, 551 et seq. [30 Cal.Rptr. 449, 381 P.2d 185]; see In re Nunez 62 Cal.2d 234, 235 [42 Cal.Rptr. 6, 397 P.2d 998].) Whether or not the claim can now be made, it does not warrant relief.
 Teran was on parole at the time of the offense charged. The Adult Authority suspended his parole and ordered his return to prison on August 1, 1962, and canceled his parole on January 24, 1963. [2] [See fn. 2] On September 26, 1963, Teran pleaded guilty to the offense, and the court stated at that time that it had read the probation report, was satisfied Teran was an addict, and "will ... recommend at this time that the Adult Authority ... not violate him on this matter ... and permit him the opportunity to get treatment at the Rehabilitation Center."  [fn. 2] Further proceedings in the criminal action were suspended, and the case was transferred to department 95 of the superior court for proceedings under former section 6451 to determine whether Teran was addicted to narcotics or in imminent danger thereof. The sheriff, as ordered by the court, filed in department 95 a petition pursuant to former section 6451.
 [3] [See fn. 3] In department 95 the court told Teran that under the regulations of the Department of Corrections he was ineligible for treatment at the rehabilitation center because he was "on state parole" and that the court therefore "cannot commit [him] to the Rehabilitation Center."  [fn. 3] Doctors who had been appointed to examine Teran had not done so when the court made the foregoing remarks. The court asked Teran if he used narcotics, and Teran admitted doing so. The court *526 then terminated the proceedings under former section 6451 and remanded Teran to the department in which the criminal action had been suspended.
 On October 28, 1963, Teran appeared in the department to which he had been remanded. His counsel requested that he be sent to Atascadero for treatment. The court denied the request, stating that the Adult Authority "are adamant. They have violated the defendant on his parole, and they are entitled to him." He was sentenced to prison and immediately appealed from the judgment.
 In February 1964 the Adult Authority reaffirmed its prior action canceling Teran's parole, and in March 1964 the Adult Authority revoked his parole. Subsequently, in April 1964, his appeal was dismissed.
 Former section 6451, as it read at the time in question, provided: "Upon conviction of a defendant for any crime in any superior court, if it appears to the judge that the defendant may be addicted or by reason of repeated use of narcotics may be in imminent danger of becoming addicted to narcotics he shall adjourn the proceedings or suspend the imposition of the sentence and conduct proceedings to ascertain if such person is addicted to narcotics or in imminent danger thereof unless in the opinion of the judge the defendant's record and probation report indicate such a pattern of criminality that he does not constitute a fit subject for commitment under this section. If a petition is ordered filed, proceedings shall be conducted in substantial compliance with Sections 5353, 5053, 5054, and 5055 of the Welfare and Institutions Code.  [fn. [4]]"
 "If, after a hearing and examination, the judge shall find that the person charged is a narcotic addict, or by reason of repeated use of narcotics is in imminent danger of becoming addicted to narcotics, he shall make an order committing such *527 person to the custody of the Director of Corrections for confinement in the facility. ..."
 [1b] In the instant case the trial court terminated the proceedings under former section 6451 before Teran was medically examined with respect to the matter of addiction, but Teran is not entitled to relief because the Adult Authority had previously canceled his parole and ordered his return to prison.
 [4] The power of the Adult Authority to suspend, cancel or revoke a parole is not limited by the statutory provisions governing commitment of persons addicted to the use of narcotics or who by reason of repeated use are in imminent danger of becoming addicted. (People v. Rummel, supra, 64 Cal.2d 515, 517-518; In re Swearingen, 64 Cal.2d 519, 522 [50 Cal.Rptr. 787, 413 P.2d 675].)
 Teran argues that the trial court abused its discretion in refusing to allow him to withdraw his guilty plea since the plea was induced by promises that he would be committed to a hospital. This argument could have been made on appeal from the judgment of conviction. (People v. Caruso, 174 Cal.App.2d 624, 630 [345 P.2d 282]; see Witkin, Cal. Criminal Procedure (1963), p. 239.) Whether or not the contention can now be made, it lacks merit.
 In March 1963 Teran, who was represented by counsel, pleaded guilty, and the matter was transferred to another department for proceedings to determine if he was addicted to narcotics or in imminent danger thereof. According to Teran, on this occasion "the Parole Department" prevented his appearance in the department to which the matter was transferred. The record shows that in April 1963 Teran made a motion to withdraw his guilty plea on the ground that he pleaded guilty because Judge Munnell in a conversation with defendant had promised him that the judge "was going to send [Teran] to the hospital." In May 1963 the trial judge in a criminal court department, after talking to Judge Munnell, permitted Teran to withdraw his guilty plea. The trial court told Teran that Judge Munnell said that he understood how Teran might have been given "that impression" but that he, Judge Munnell, "certainly did not tell him that would be the eventual disposition of the case." In June 1963 Teran pleaded not guilty.
 On September 26, 1963, Teran, appearing with counsel, stated that he wanted to withdraw his not guilty plea in order to plead guilty. He was asked whether he was doing so freely and voluntarily after talking to his attorney, and he replied, *528 "Yes." He then entered a plea of guilty. On October 28, 1963, he again appeared with counsel. [5] During proceedings on that date the trial court asked if there was any cause why judgment should not be pronounced, and Teran said, "I didn't want to plead guilty that day. Mr. Caruso [one of his attorneys] told me I was going to go to the hospital, you know. I didn't get to go to the hospital." Mr. Caruso then stated that he had made "a full and complete disclosure of all the facts" to Teran and "explained fully--." The trial court interrupted him stating, "I am satisfied you did. ... That has been your practice."
 Even if Teran's comments were viewed as a motion to withdraw his guilty plea on the ground of the asserted promise, it does not appear that the trial court abused its discretion in not granting the motion. The attorney's statements suggest that such a promise was not made, and the trial court appears to have believed the attorney. In any event, in the absence of state involvement, advice or assurances by defense counsel will not vitiate a plea entered in reliance thereon. (In re Nunez, supra, 62 Cal.2d 234, 236; People v. Caruso, supra, 174 Cal.App.2d 624, 637-638, 640; see In re Watkins, 64 Cal.2d 866, 872 [51 Cal.Rptr. 917, 415 P.2d 805]; People v. Fleming, 190 Cal.App.2d 149, 150 [11 Cal.Rptr. 743].) Teran did not claim at the proceedings on October 28, 1963, that his guilty plea was based in part on the promise assertedly made by Judge Munnell months before, and, as we have seen, before Teran pleaded guilty on September 26, 1963, he had been told in effect that he misunderstood what Judge Munnell stated.
 [6] In contending that he was deprived of the effective assistance of counsel, Teran asserts that his attorneys did not investigate whether evidence was obtained in an unlawful search and that had they done so they would not have advised a guilty plea but would have moved for a dismissal under Penal Code, section 995. According to Teran, the facts surrounding the search were as follows: On July 22, 1962, he "allegedly" failed a Nalline test and ran from the testing center. On August 2, 1962, the police received an anonymous telephone call that he was wanted for parole violation, was selling narcotics, and was at a hotel. The police telephoned the parole office and were advised that he was wanted for parole violation. Thereafter the police, without an arrest or search warrant, went to the hotel and waited in a room adjoining his. When he left his room they shoved him back inside and handcuffed him. They saw a spoon and eyedropper on his bureau, searched his room, and found heroin. *529
 It does not appear from the alleged facts that the arrest was unlawful or that the search was not incidental thereto. (People v. Giles, 233 Cal.App.2d 643, 644 et seq. [43 Cal.Rptr. 758]; People v. Nichols, 196 Cal.App.2d 223, 228- 229 [16 Cal.Rptr. 328]; see People v. Gallegos, 62 Cal.2d 176, 178 [41 Cal.Rptr. 590, 397 P.2d 174].) Thus any failure by Teran's counsel to investigate the search does not appear to have been prejudicial.
 The order to show cause is discharged, and the writ of habeas corpus is denied.
 Traynor, C. J., McComb, J., Peters, J., Tobriner, J., Mosk, J., and Peek, J.,  [fn. *] concurred.
 Former section 5053 (now  5564) contained provisions concerning the issuance of subpoenas and provided, "The judge shall compel the attendance of at least two medical examiners, who shall hear the testimony of all witnesses, make a personal examination of the alleged mentally ill person, and testify before the judge as to the result of the examination, and to any other pertinent facts within their knowledge."
 Former section 5054 (now  5565) directed that the person be present at the hearing and provided for the appointment of counsel to represent him.
 Former section 5055 (now  5566) provided, "The medical examiners, after making the examination and hearing the testimony, shall make and sign a certificate showing as nearly as possible the facts herein indicated, in substantially the following form: ..."
NOTES
[fn. 1]  1. Former section 6451 was repealed by Statutes of 1965, chapter 1226, page 3062, and the subject matter of the repealed section is now contained in Welfare and Institutions Code section 3051.
[fn. 2]  2. Since the Adult Authority had already canceled defendant's parole and ordered his return to prison, the trial court should not have instituted proceedings under the narcotics rehabilitation program in the absence of indication by the Adult Authority that it would be willing to rescind its action if Teran were found by the court to be a proper subject for commitment to the narcotics rehabilitation program.
[fn. 3]  3. As pointed out in People v. Rummel, 64 Cal.2d 515, 517-518 [50 Cal.Rptr. 785, 413 P.2d 673], defendant's status as a parolee, standing alone, did not bar him from consideration under the rehabilitation program; however, here his parole had been canceled and he had been ordered returned to prison, and this barred him from consideration. The Adult Authority had full authority to cancel his parole.
[fn. [4]]  [4]. Former section 5353 (now  5628) contained provisions relating to matters such as informing the defendant of his right to make a defense and to produce witnesses.
[fn. *]  *. Retired Associate Justice of the Supreme Court sitting under assignment by the Chairman of the Judicial Council.
