It's not a problem if police obtain a warrant. It's also OK if evidence is discovered while not performing an illegal search. For instance, if a police officer knocks on your door, you open it, and they see something in your apartment which gives them probable cause of the commission of a crime.