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>
This commit is contained in:
Meelis Roos 2009-02-10 17:19:19 -08:00 committed by David S. Miller
parent e672f7db76
commit fcffd0d8bb

View File

@ -2519,8 +2519,8 @@ fore200e_load_and_start_fw(struct fore200e* fore200e)
return err; return err;
sprintf(buf, "%s%s", fore200e->bus->proc_name, FW_EXT); sprintf(buf, "%s%s", fore200e->bus->proc_name, FW_EXT);
if (request_firmware(&firmware, buf, device) == 1) { if ((err = request_firmware(&firmware, buf, device)) < 0) {
printk(FORE200E "missing %s firmware image\n", fore200e->bus->model_name); printk(FORE200E "problem loading firmware image %s\n", fore200e->bus->model_name);
return err; return err;
} }