mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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]>
This commit is contained in:
parent
b05f0548da
commit
50ab1a7286
1 changed files with 4 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue