diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-06-01 19:04:51 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-01 15:54:38 -0700 |
commit | f336d0b93ae978f12c5e27199f828da89b91e56a (patch) | |
tree | d11f812a0ca9b79551d5cc6d5ac7a70d838fea9d /drivers/net/ethernet | |
parent | 53d5fa9b234ea0b1adc810d5d2bf4d815ae7db51 (diff) |
ethernet: myri10ge: Fix missing error code in myri10ge_probe()
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index c84c8bf2bc20..fc99ad8e4a38 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c @@ -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, |