usb: gadget: atmel_usba: fix crashed during stopping when DEBUG is enabled
usb: gadget: atmel_usba: fix crashed during stopping when DEBUG is enabled

commit 511f3c5 (usb: gadget: udc-core: fix a regression during gadget driver
unbinding) introduced a crash when DEBUG is enabled.

The debug trace in the atmel_usba_stop function made the assumption that the
driver pointer passed in parameter was not NULL, but since the commit above,
such assumption was no longer always true.

This commit now uses the driver pointer stored in udc which fixes this
issue.

[ 94dddeeef08b001e003cce128ddc162a4e2c6cd2@ti.com : improved commit log a bit ]

Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org> # v3.2+
Acked-by: Alexandre Belloni <a7228e626ecf0022ac91fc1cd8db88e71d0e5e0e@free-electrons.com>
Signed-off-by: Gregory CLEMENT <cd8db494d8ed74d7c3f56ec5c769dff3d51dd397@free-electrons.com>
Signed-off-by: Felipe Balbi <94dddeeef08b001e003cce128ddc162a4e2c6cd2@ti.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs