Commit f336d0b9 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by David S. Miller

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: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53d5fa9b
...@@ -3815,6 +3815,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3815,6 +3815,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
dev_err(&pdev->dev, dev_err(&pdev->dev,
"invalid sram_size %dB or board span %ldB\n", "invalid sram_size %dB or board span %ldB\n",
mgp->sram_size, mgp->board_span); mgp->sram_size, mgp->board_span);
status = -EINVAL;
goto abort_with_ioremap; goto abort_with_ioremap;
} }
memcpy_fromio(mgp->eeprom_strings, memcpy_fromio(mgp->eeprom_strings,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment