A 23-year-old man was found with cocaine and cannabis worth more than £4,000 in his bedroom at his parents' home.
Shaun Marriott was given a suspended sentence after a court heard he may have been a 'fall guy' for others.
Police found the drugs while visiting Marriott's parents' home in Drayton Road, Hartlepool, for an unrelated matter, Teesside Crown Court heard.
"Cocaine was found in his bedroom and on a television stand," said Emma Atkinson, prosecuting.
"Its total street value was just over £800.
"The cannabis was drying in the bedroom, that had a street value of £3,400.
"There was also scales and a notebook which the prosecution say contained a tick list of deals."
Marriott, of Huxley Walk, Hartlepool, admitted possession of Class A and Class B drugs with intent to supply them on January 13.
Stephen Constantine, defending, said in mitigation: "When the police arrived, two other men left another bedroom in the property.
"They were not questioned or arrested by the officer because at that time he was not aware any offence had been committed.
"Mr Marriott accepts the drugs were in his room, but he understood the cocaine was only going to be there for a couple of days.
"At this time he was heavily dependent on drugs himself, which affected his thinking skills - stupid is as stupid does."
The court heard Marriott has since left the family home.
"He is no longer allowed to live there," said Mr Constantine.
"Mr Marriott has sought help with his drugs problems, and he has a partner who has been a stabilising influence on him.
"She is pregnant with the couple's twins.
"Mr Marriott has turned himself around to the extent that he has a job offer."
Judge Stephen Ashurst sentenced Marriott to 18 months in prison, suspended for two years, 20 rehabilitation activity days, and ordered him to do 100 hours of unpaid work.
The judge told Marriott: "There is some evidence that you were a fall guy for others.
"You have one of the better probation reports I have seen.
"I am more confident than with most defendants that you will not re-offend."
The drugs found in Marriott's room were confiscated and will be destroyed.