Skip to content

Commit fcffd0d

Browse files
meelisroosdavem330
authored andcommitted
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>
1 parent e672f7d commit fcffd0d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/atm/fore200e.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,8 +2519,8 @@ fore200e_load_and_start_fw(struct fore200e* fore200e)
25192519
return err;
25202520

25212521
sprintf(buf, "%s%s", fore200e->bus->proc_name, FW_EXT);
2522-
if (request_firmware(&firmware, buf, device) == 1) {
2523-
printk(FORE200E "missing %s firmware image\n", fore200e->bus->model_name);
2522+
if ((err = request_firmware(&firmware, buf, device)) < 0) {
2523+
printk(FORE200E "problem loading firmware image %s\n", fore200e->bus->model_name);
25242524
return err;
25252525
}
25262526

0 commit comments

Comments
 (0)