Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758471Ab0KSWJ3 (ORCPT ); Fri, 19 Nov 2010 17:09:29 -0500 Received: from kroah.org ([198.145.64.141]:53032 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758161Ab0KSWE2 (ORCPT ); Fri, 19 Nov 2010 17:04:28 -0500 X-Mailbox-Line: From gregkh@clark.site Fri Nov 19 14:01:26 2010 Message-Id: <20101119220126.057034229@clark.site> User-Agent: quilt/0.48-11.2 Date: Fri, 19 Nov 2010 14:01:18 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Nicolas Ferre , Jean-Christophe PLAGNIOL-VILLARD Subject: [47/66] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled In-Reply-To: <20101119220309.GA15562@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1097 Lines: 37 2.6.36-stable review patch. If anyone has any objections, please let us know. ------------------ From: Jean-Christophe PLAGNIOL-VILLARD commit 969affff54702785330de553b790372e261e93f9 upstream. to ensure gpio_is_valid return false Signed-off-by: Nicolas Ferre Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/atmel_usba_udc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -2014,6 +2014,9 @@ static int __init usba_udc_probe(struct } else { disable_irq(gpio_to_irq(udc->vbus_pin)); } + } else { + /* gpio_request fail so use -EINVAL for gpio_is_valid */ + ubc->vbus_pin = -EINVAL; } } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/