staging/mei: propagate error codes up in the write flow
[pandora-kernel.git] / drivers / staging / mei / main.c
index 1e1a9f9..55b3908 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *
  * Intel Management Engine Interface (Intel MEI) Linux driver
- * Copyright (c) 2003-2011, Intel Corporation.
+ * Copyright (c) 2003-2012, Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -430,7 +430,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
                goto free;
        } else if ((!cl->read_cb || !cl->read_cb->information) &&
                    *offset > 0) {
-               /*Offset needs to be cleaned for contingous reads*/
+               /*Offset needs to be cleaned for contiguous reads*/
                *offset = 0;
                rets = 0;
                goto out;
@@ -493,7 +493,7 @@ copy_buffer:
                goto free;
        }
 
-       /* length is being turncated to PAGE_SIZE, however, */
+       /* length is being truncated to PAGE_SIZE, however, */
        /* information size may be longer */
        length = min_t(size_t, length, (cb->information - *offset));
 
@@ -740,7 +740,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
                mei_hdr.reserved = 0;
                dev_dbg(&dev->pdev->dev, "call mei_write_message header=%08x.\n",
                    *((u32 *) &mei_hdr));
-               if (!mei_write_message(dev, &mei_hdr,
+               if (mei_write_message(dev, &mei_hdr,
                        (unsigned char *) (write_cb->request_buffer.data),
                        mei_hdr.length)) {
                        rets = -ENODEV;