diff options
author | Meelis Roos <mroos@linux.ee> | 2009-02-10 20:19:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-10 20:19:19 -0500 |
commit | fcffd0d8bbddac757cd856e635ac75e8eb4518bc (patch) | |
tree | 0cd406e00238ed32dad2dc9d4edfaab8775e13f4 /drivers/atm/fore200e.c | |
parent | e672f7db767156bf71adf9c592cfe81b339523d6 (diff) |
fore200: fix oops on failed firmware load
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>
Diffstat (limited to 'drivers/atm/fore200e.c')
-rw-r--r-- | drivers/atm/fore200e.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 937c9c0ef4c9..10f000dbe448 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -2519,8 +2519,8 @@ fore200e_load_and_start_fw(struct fore200e* fore200e) | |||
2519 | return err; | 2519 | return err; |
2520 | 2520 | ||
2521 | sprintf(buf, "%s%s", fore200e->bus->proc_name, FW_EXT); | 2521 | sprintf(buf, "%s%s", fore200e->bus->proc_name, FW_EXT); |
2522 | if (request_firmware(&firmware, buf, device) == 1) { | 2522 | if ((err = request_firmware(&firmware, buf, device)) < 0) { |
2523 | printk(FORE200E "missing %s firmware image\n", fore200e->bus->model_name); | 2523 | printk(FORE200E "problem loading firmware image %s\n", fore200e->bus->model_name); |
2524 | return err; | 2524 | return err; |
2525 | } | 2525 | } |
2526 | 2526 | ||