From: Ryan CHEN Date: Wed, 20 Aug 2008 17:00:17 +0000 (-0400) Subject: Correct drv_usb_kbd_init function X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=3b20fd83c73c22acfcb0c6663be747bd5c8b7011;p=u-boot.git Correct drv_usb_kbd_init function The patch is that check if usb_get_dev_index() function return valid pointer. If valid, continue. Otherwise return -1. Signed-off-by: Ryan Chen Acked-by: Markus Klotzbuecher --- diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 108bd60f95..920bb0ffbe 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -162,6 +162,8 @@ int drv_usb_kbd_init(void) /* scan all USB Devices */ for(i=0;idevnum!=-1) { if(usb_kbd_probe(dev,0)==1) { /* Ok, we found a keyboard */ /* check, if it is already registered */