lkml.org 
[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 37/96] fore200: fix oops on failed firmware load
2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Meelis Roos <mroos@linux.ee>

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 <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/atm/fore200e.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2578,8 +2578,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;
}




\
 
 \ /
  Last update: 2009-03-14 01:33    [W:0.320 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site