mailbox: arm_mhuv2: Add driver
[linux-2.6-microblaze.git] / kernel / fail_function.c
index 63b3491..b0b1ad9 100644 (file)
@@ -253,7 +253,7 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
 
        if (copy_from_user(buf, buffer, count)) {
                ret = -EFAULT;
-               goto out;
+               goto out_free;
        }
        buf[count] = '\0';
        sym = strstrip(buf);
@@ -307,8 +307,9 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
                ret = count;
        }
 out:
-       kfree(buf);
        mutex_unlock(&fei_lock);
+out_free:
+       kfree(buf);
        return ret;
 }