Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50ab1a72863b1ad4b117862bc52610f8d4535609
Commit:     50ab1a72863b1ad4b117862bc52610f8d4535609
Parent:     b05f0548dabd20433f8c201a0307103721d6a18b
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 20 16:05:10 2007 +0900
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:51:10 2007 -0700

    sysfs: kill unnecessary NULL pointer check in sysfs_release()
    
    In sysfs_release(), sysfs_buffer pointed to by filp->private_data is
    guaranteed to exist.  Kill the unnecessary NULL check.  This also
    makes the code more consistent with the counterpart in fs/sysfs/bin.c.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Acked-by: Cornelia Huck <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/file.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 73333dc..8f1ebd8 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -311,11 +311,10 @@ static int sysfs_release(struct inode * inode, struct 
file * filp)
 {
        struct sysfs_buffer *buffer = filp->private_data;
 
-       if (buffer) {
-               if (buffer->page)
-                       free_page((unsigned long)buffer->page);
-               kfree(buffer);
-       }
+       if (buffer->page)
+               free_page((unsigned long)buffer->page);
+       kfree(buffer);
+
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to