  Let $f(q)$ denote Ramanujan's mock theta function \[f(q) =
\sum_{n=0}^{\infty} a(n) q^{n} := 1+\sum_{n=1}^{\infty}
\frac{q^{n^{2}}}{(1+q)^{2}(1+q^{2})^{2}\cdots(1+q^{n})^{2}}.\] It is known that
there are many linear congruences for the coefficients of $f(q)$ and other mock
theta functions. We prove that if the linear congruence $a(mn+t) \equiv 0
\pmod{\ell}$ holds for some prime $\ell \geq 5$, then $\ell | m$ and
$(\frac{24t-1}{\ell}) \neq (\frac{-1}{\ell})$. We prove analogous results for
the mock theta function $\omega(q)$ and for a large class of weakly holomorphic
modular forms which includes $\eta$-quotients. This extends work of Radu in
which he proves a conjecture of Ahlgren and Ono for the partition function
$p(n)$.
