diff --git a/nshlib/nsh_usbdev.c b/nshlib/nsh_usbdev.c index 87689d5a2..40e35d5f4 100644 --- a/nshlib/nsh_usbdev.c +++ b/nshlib/nsh_usbdev.c @@ -128,13 +128,11 @@ int nsh_usbconsole(void) fd = open(CONFIG_NSH_USBCONDEV, O_RDWR); if (fd < 0) { - int errval = errno; - /* ENOTCONN means that the USB device is not yet connected. Anything * else is bad. */ - DEBUGASSERT(errval == ENOTCONN); + DEBUGASSERT(errno == ENOTCONN); /* Sleep a bit and try again */