If the magistrate finds that any person brought before him has been guilty of a violation of this article he shall impose the punishment prescribed in this article and also award the possession of the property taken upon the search warrant to the owner.