diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/isicom.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 9c6be8da220c..4f3cefa8eb0e 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -813,15 +813,13 @@ static int isicom_setup_port(struct isi_port *port) | |||
813 | return 0; | 813 | return 0; |
814 | if (!port->xmit_buf) { | 814 | if (!port->xmit_buf) { |
815 | /* Relies on BKL */ | 815 | /* Relies on BKL */ |
816 | void *xmit_buf = (void *)get_zeroed_page(GFP_KERNEL); | 816 | unsigned long page = get_zeroed_page(GFP_KERNEL); |
817 | 817 | if (page == 0) | |
818 | if (xmit_buf == NULL) | ||
819 | return -ENOMEM; | 818 | return -ENOMEM; |
820 | if (port->xmit_buf) { | 819 | if (port->xmit_buf) |
821 | free_page((unsigned long)xmit_buf); | 820 | free_page(page); |
822 | return -ERESTARTSYS; | 821 | else |
823 | } | 822 | port->xmit_buf = (unsigned char *) page; |
824 | port->xmit_buf = xmit_buf; | ||
825 | } | 823 | } |
826 | 824 | ||
827 | spin_lock_irqsave(&card->card_lock, flags); | 825 | spin_lock_irqsave(&card->card_lock, flags); |