diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-06-01 19:04:51 +0800 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-06-30 08:48:12 -0400 |
commit | c6095a0fa07f3f88004f23dd5993d4af27afd55d (patch) | |
tree | 8dba8435b684f2f7515fc3595083ee34fc36dfcb | |
parent | 8fa2bb8837ea92f725e63ec38935195bc0266668 (diff) | |
download | linux-stable-c6095a0fa07f3f88004f23dd5993d4af27afd55d.tar.gz linux-stable-c6095a0fa07f3f88004f23dd5993d4af27afd55d.tar.bz2 linux-stable-c6095a0fa07f3f88004f23dd5993d4af27afd55d.zip |
ethernet: myri10ge: Fix missing error code in myri10ge_probe()
[ Upstream commit f336d0b93ae978f12c5e27199f828da89b91e56a ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 6789eed78ff7..3bc570c46f81 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c @@ -3853,6 +3853,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, |