The magistrate must annex the affidavit, or affidavits, the search warrant and return, and the inventory, and if he has not power to inquire into the offense in respect to which the warrant was issued, he must at once file such warrant and return and such affidavit, or affidavits, and inventory with the clerk of the court having power to so inquire.
Ca. Pen. Code § 1541