The Code of Criminal Procedure, 1973 (CrPc)
460. Irregularities, which do not vitiate proceedings.
If any Magistrate not empowered by law to do any of the following things, namely.
(a) To issue a search-warrant under section 94;
(b) To order, under section 155, the police to investigate an offence;
(c) To hold an inquest under section 176;
(d) To issue process under section 187, for the apprehension of a person within his local jurisdiction who has committed an offence outside the limits of such jurisdiction;
(e) To take cognizance of an offence under clause (a) or clause (b) of sub-section (1) of section 190;
(f) To make over a case under sub-section (2) of section 192;
(g) To tender a pardon under section 306;
(h) To recall a case and try it himself under section 410; or
(i) To sell property under section 458 or section 459,
erroneously in good faith does that thing; his proceedings shall not be set-aside merely on the ground of his not being so empowered.