Flaw in my logic on Henry's Law?

It states mathematically $p=Kx$ where $x$ is mole fraction of dissolved gas and $p$ is partial pressure of the gas.
Dissolution of gases is exothermic, so with increase in temperature, solubility $x$ decreases.
But increase in temperature also means an increase in partial pressure $p$ which in turn means an increase in solubility $x$. Where am I going wrong?

• Temperature only affects pressure if you allow it to: by keeping volume constant. If your system has a freely moving piston holding the gas for example, then temperature will lead to a volume expansion, pressure remaining constant. – Vinícius Godim Mar 24 '18 at 3:38