aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/char/isicom.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 91b978445229..783a7ec0a8e6 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);