mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
usb: kbd: Do not treat -ENODEV as an error for usb_kbd_deregister
ENODEV menas no usb keyboard was registered, threat this as a successful usb_kbd_deregister. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:

committed by
Marek Vasut

parent
9b2393812e
commit
0ea09dfe87
@ -8,6 +8,7 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <stdio_dev.h>
|
#include <stdio_dev.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
@ -559,7 +560,11 @@ int drv_usb_kbd_init(void)
|
|||||||
int usb_kbd_deregister(void)
|
int usb_kbd_deregister(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SYS_STDIO_DEREGISTER
|
#ifdef CONFIG_SYS_STDIO_DEREGISTER
|
||||||
return stdio_deregister(DEVNAME);
|
int ret = stdio_deregister(DEVNAME);
|
||||||
|
if (ret && ret != -ENODEV)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
return 0;
|
||||||
#else
|
#else
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user