Because it is necessary to have infinite knowledge in order to be God - a premise granted for the sake of argument - it does not follow that to have infinite knowledge is sufficient to be God. God is generally credited with other attributes unconnected with infinite knowledge - omnipotence and omnibenevolence, for example.
This appears to be a form of affirming the consequent : If p then q, q therefore p. In terms of the example, if X is God then God has infinite knowledge; Y has infinite knowledge; therefore Y = X = God.
Also if the conceptconcept of God should prove to be demonstrably incoherent or self-contradictory, which is a logical possibility, one would not need infinite knowledge in order to demonstrate that God does not exist. It would be sufficient to deduce that, quaqua incoherent or self-contradictory, the concept of God cannot be instantiated.