summaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r--drivers/char/isicom.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 9c6be8da220..4f3cefa8eb0 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -813,15 +813,13 @@ static int isicom_setup_port(struct isi_port *port)
return 0;
if (!port->xmit_buf) {
/* Relies on BKL */
- void *xmit_buf = (void *)get_zeroed_page(GFP_KERNEL);
-
- if (xmit_buf == NULL)
+ unsigned long page = get_zeroed_page(GFP_KERNEL);
+ if (page == 0)
return -ENOMEM;
- if (port->xmit_buf) {
- free_page((unsigned long)xmit_buf);
- return -ERESTARTSYS;
- }
- port->xmit_buf = xmit_buf;
+ if (port->xmit_buf)
+ free_page(page);
+ else
+ port->xmit_buf = (unsigned char *) page;
}
spin_lock_irqsave(&card->card_lock, flags);