Consider simple random walk started at $1$ on the path $[0,M]$. Let $\tau\_x$ be the time to reach $x$ and condition on the event $\tau\_M < \tau\_0$ (the walk hits $M$ before reaching $0$). Conditioned on this event, let $V\_k$ be the number of visits to $k$ up to time $\tau\_M$. What is $\mathbb E V\_k$? 


All we need is a bound independent of $M$. Something like there exists $C>0$ such that


$$\sup\_{M >0 }\Bigl[ \max\_{0< k < M} \mathbb E V\_k \Bigr]< C.$$



Local time for conditioned simple random walk
To second Anthony Quas's answer, here's a simple way to calculate $\mathbb{E}V\_k$. Notice that conditional on $\tau\_M<\tau\_0$ your walk will visit $k$ at least once. Once we are at $k$, the number of consecutive visits is a positive geometric random variable, since the walk is a Markov process. The parameter is $1-\mathbb{P}(V\_k=1 | \tau\_M<\tau\_0)$, and therefore its expectation value is 
$$\mathbb{E}[V\_k]=\frac{1}{\mathbb{P}(V\_k=1 | \tau\_M<\tau\_0)} = \frac{\mathbb{P}(\tau\_M < \tau\_0)}{\mathbb{P}(\tau\_k<\tau\_0)\frac{1}{2}\mathbb{P}(\tau\_{M-k}<\tau\_0)},$$
since the walk has to visit $k$ before $0$, step to $k+1$, and then visit $M$ before returning to $k$. Since $\mathbb{P}(\tau\_M < \tau\_0) = 1/M$ (ballot problem) we find $$\mathbb{E}[V\_k]= 2 k (1-k/M)$$.


