Commit 8cd64518 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

isicom: fix buffer allocation

Fix the rather strange buffer management on open that turned up while auditing
for BKL dependencies.

Signed-off-by: default avatarAlan Cox <>
Cc: Jiri Slaby <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent fb100b6e
......@@ -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);
port->xmit_buf = xmit_buf;
if (port->xmit_buf)
port->xmit_buf = (unsigned char *) page;
spin_lock_irqsave(&card->card_lock, flags);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment