diff mbox

fore200: fix oops on failed firmware load

Message ID Pine.SOC.4.64.0902101701420.11180@math.ut.ee
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Meelis Roos Feb. 10, 2009, 5:39 p.m. UTC
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 <mroos@linux.ee>

Comments

David Miller Feb. 11, 2009, 1:19 a.m. UTC | #1
From: Meelis Roos <mroos@linux.ee>
Date: Tue, 10 Feb 2009 19:39:24 +0200 (EET)

> 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 <mroos@linux.ee>

Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 937c9c0..10f000d 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2519,8 +2519,8 @@  fore200e_load_and_start_fw(struct fore200e* fore200e)
 	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;
     }