Skip to content

Commit

Permalink
fore200: fix oops on failed firmware load
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
meelisroos authored and davem330 committed Feb 11, 2009
1 parent e672f7d commit fcffd0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/atm/fore200e.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit fcffd0d

Please sign in to comment.