From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan CHEN Date: Wed, 20 Aug 2008 13:00:17 -0400 Subject: [U-Boot] [PATCH] Correct drv_usb_kbd_init function Message-ID: <1219251617-26166-1-git-send-email-ryan.chen@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- common/usb_kbd.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index c876495..880e616 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -164,6 +164,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 */ -- 1.6.0.rc1