SUNRPC: RPC buffer size estimates are too large
[powerpc.git] / fs / sysfs / bin.c
index e8f540d..8ea2a51 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 
 #include <asm/uaccess.h>
+#include <asm/semaphore.h>
 
 #include "sysfs.h"
 
@@ -58,7 +59,7 @@ read(struct file * file, char __user * userbuf, size_t count, loff_t * off)
        if (copy_to_user(userbuf, buffer, count))
                return -EFAULT;
 
-       pr_debug("offs = %lld, *off = %lld, count = %zd\n", offs, *off, count);
+       pr_debug("offs = %lld, *off = %lld, count = %d\n", offs, *off, count);
 
        *off = offs + count;
 
@@ -146,7 +147,7 @@ static int open(struct inode * inode, struct file * file)
  Error:
        module_put(attr->attr.owner);
  Done:
-       if (error && kobj)
+       if (error)
                kobject_put(kobj);
        return error;
 }
@@ -157,8 +158,7 @@ static int release(struct inode * inode, struct file * file)
        struct bin_attribute * attr = to_bin_attr(file->f_path.dentry);
        u8 * buffer = file->private_data;
 
-       if (kobj) 
-               kobject_put(kobj);
+       kobject_put(kobj);
        module_put(attr->attr.owner);
        kfree(buffer);
        return 0;