diff options
-rw-r--r-- | drivers/char/isicom.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 91b9784..783a7ec 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -1709,6 +1709,11 @@ static int __devinit load_firmware(struct pci_dev *pdev, } data = kmalloc(word_count * 2, GFP_KERNEL); + if (data == NULL) { + dev_err(&pdev->dev, "Card%d, firmware upload " + "failed, not enough memory\n", index + 1); + goto errrelfw; + } inw(base); insw(base, data, word_count); InterruptTheCard(base); |