]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/char/vmcp.c
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
[linux-2.6-omap-h63xx.git] / drivers / s390 / char / vmcp.c
index 7f11a608a63371855c8fd36ba18ac3967c372178..19762f3476aadd22289d4ddb4a44d82985465bf4 100644 (file)
@@ -103,8 +103,10 @@ vmcp_write(struct file *file, const char __user * buff, size_t count,
        }
        cmd[count] = '\0';
        session = (struct vmcp_session *)file->private_data;
-       if (down_interruptible(&session->mutex))
+       if (down_interruptible(&session->mutex)) {
+               kfree(cmd);
                return -ERESTARTSYS;
+       }
        if (!session->response)
                session->response = (char *)__get_free_pages(GFP_KERNEL
                                                | __GFP_REPEAT  | GFP_DMA,
@@ -115,9 +117,9 @@ vmcp_write(struct file *file, const char __user * buff, size_t count,
                return -ENOMEM;
        }
        debug_text_event(vmcp_debug, 1, cmd);
-       session->resp_size = cpcmd(cmd, session->response,
-                                  session->bufsize,
-                                  &session->resp_code);
+       session->resp_size = __cpcmd(cmd, session->response,
+                                    session->bufsize,
+                                    &session->resp_code);
        up(&session->mutex);
        kfree(cmd);
        *ppos = 0;              /* reset the file pointer after a command */