aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-08 05:38:54 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:57 -0500
commitf0671378426d9768bf20d5e0f8389374dcdc2abf (patch)
tree232da6f0310b63e1ab921f5c60d67dc6b77f060d /drivers/char/isicom.c
parent78028da91e05146c9ce0c9db2fea53e0cded1e81 (diff)
[PATCH] Char: isicom, check kmalloc retval
Value returned from kamlloc may be NULL, we should check if ENOMEM occured. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/isicom.c')
-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,
1709 } 1709 }
1710 1710
1711 data = kmalloc(word_count * 2, GFP_KERNEL); 1711 data = kmalloc(word_count * 2, GFP_KERNEL);
1712 if (data == NULL) {
1713 dev_err(&pdev->dev, "Card%d, firmware upload "
1714 "failed, not enough memory\n", index + 1);
1715 goto errrelfw;
1716 }
1712 inw(base); 1717 inw(base);
1713 insw(base, data, word_count); 1718 insw(base, data, word_count);
1714 InterruptTheCard(base); 1719 InterruptTheCard(base);