I was reading my thermodynamics textbook and it mentions that $p^{1-\gamma}T^{\gamma} = K$ where $K$ is a constant, $p$ is pressure, $T$ is temperature, and $\gamma$ is the adiabatic index (this formula is closely related to the Adiabatic equation). It says that it follows from this that $(1-\gamma)\frac{dp}{p} + \gamma\frac{dT}{T} = 0$ but I can't reproduce this result.
I tried taking logs of both sides:
$$\ln(p^{1-\gamma}T^{\gamma}) = \ln(K) $$ $$\ln(p^{1-\gamma})+(T^{\gamma}) = \ln(K) $$ $$(1-\gamma) \ln(p)+\gamma \ln(T) = \ln(K) $$ $$(1-\gamma) \frac{dp}{p}+\gamma \frac{dT}{T} = \ln(K) $$
Where on the last line I have used $\ln(x) = \frac{dx}{x}$. However, I can't seem to understand why the RHS should equal zero. Is this an issue with my maths or is there a physical explanation?