staging: emxx_udc: Fix invalid reference error
authorJavier F. Arias <jarias.linux@gmail.com>
Wed, 30 Oct 2019 03:04:19 +0000 (22:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Oct 2019 09:38:46 +0000 (10:38 +0100)
commit67e7bd248473ede722563ae1a8d24e856a42f644
treedbbd3cbd1a42e349a317146f47e38808e183c8ee
parent09ef6fde7d89d08f390e6cf53cf40f9623d61616
staging: emxx_udc: Fix invalid reference error

This patch fixes an invalid reference error by moving the code that
is executed when a queue element is found, into the loop. Also, it
removes an unnecessary test that now checks if the element is not
present in the queue.
Issue found by Coccinelle.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/20191030030419.mmnrzm7hr4encfai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/emxx_udc/emxx_udc.c