Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934190AbZAOUup (ORCPT ); Thu, 15 Jan 2009 15:50:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932322AbZAOUCt (ORCPT ); Thu, 15 Jan 2009 15:02:49 -0500 Received: from kroah.org ([198.145.64.141]:49753 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932306AbZAOUCp (ORCPT ); Thu, 15 Jan 2009 15:02:45 -0500 Date: Thu, 15 Jan 2009 12:00:21 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Jiri Kosina Subject: [patch 81/94] HID: fix error condition propagation in hid-sony driver Message-ID: <20090115200021.GC14419@kroah.com> References: <20090115194806.804618825@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="hid-fix-error-condition-propagation-in-hid-sony-driver.patch" In-Reply-To: <20090115195520.GA14403@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1042 Lines: 37 2.6.28-stable review patch. If anyone has any objections, please let us know. ------------------ From: Jiri Kosina commit 4dfdc46468a142216b284eea66040f49df3f7191 upstream. sony_set_operational() only propagates return value from usb_control_msg(), which returns negative on error and number of transferred bytes otherwise. Reported-by: Marcin Tolysz Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-sony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -102,7 +102,7 @@ static int sony_probe(struct hid_device } ret = sony_set_operational(hdev); - if (ret) + if (ret < 0) goto err_stop; return 0; -- 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/