Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760842AbZCNBsf (ORCPT ); Fri, 13 Mar 2009 21:48:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753816AbZCNBVc (ORCPT ); Fri, 13 Mar 2009 21:21:32 -0400 Received: from kroah.org ([198.145.64.141]:35574 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754520AbZCNBU7 (ORCPT ); Fri, 13 Mar 2009 21:20:59 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Fri Mar 13 18:10:42 2009 Message-Id: <20090314011042.780575799@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Fri, 13 Mar 2009 18:10:54 -0700 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, Meelis Roos , "David S. Miller" Subject: [patch 077/114] fore200: fix oops on failed firmware load References: <20090314010937.416083662@mini.kroah.org> Content-Disposition: inline; filename=fore200-fix-oops-on-failed-firmware-load.patch In-Reply-To: <20090314011649.GA26170@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1379 Lines: 30 2.6.28-stable review patch. If anyone has any objections, please let us know. ------------------ From: Meelis Roos commit fcffd0d8bbddac757cd856e635ac75e8eb4518bc upstream. Fore 200 ATM driver fails to handle request_firmware failures and oopses when no firmware file was found. Fix it by checking for the right return values and propaganting the return value up. Signed-off-by: Meelis Roos Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/atm/fore200e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c @@ -2519,8 +2519,8 @@ fore200e_load_and_start_fw(struct fore20 return err; sprintf(buf, "%s%s", fore200e->bus->proc_name, FW_EXT); - if (request_firmware(&firmware, buf, device) == 1) { - printk(FORE200E "missing %s firmware image\n", fore200e->bus->model_name); + if ((err = request_firmware(&firmware, buf, device)) < 0) { + printk(FORE200E "problem loading firmware image %s\n", fore200e->bus->model_name); return err; } -- 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/