]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ethernet: myri10ge: Fix missing error code in myri10ge_probe()
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Tue, 1 Jun 2021 11:04:51 +0000 (19:04 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Jun 2021 22:54:38 +0000 (15:54 -0700)
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'status'.

Eliminate the follow smatch warning:

drivers/net/ethernet/myricom/myri10ge/myri10ge.c:3818 myri10ge_probe()
warn: missing error code 'status'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/myricom/myri10ge/myri10ge.c

index c84c8bf2bc20eaefb6711b5836652502f9196da8..fc99ad8e4a388c02578f338d9006b0e69737c79d 100644 (file)
@@ -3815,6 +3815,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                dev_err(&pdev->dev,
                        "invalid sram_size %dB or board span %ldB\n",
                        mgp->sram_size, mgp->board_span);
+               status = -EINVAL;
                goto abort_with_ioremap;
        }
        memcpy_fromio(mgp->eeprom_strings,