Commit f245e1c1 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Linus Torvalds

fs/proc/inode.c: remove cast from memory allocation

Coccinelle emits this warning:

  WARNING: casting value returned by memory allocation function to (struct proc_inode *) is useless.

Remove unnecessary cast.

Link: http://lkml.kernel.org/r/1487745720-16967-1-git-send-email-me@tobin.ccSigned-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent baf6a9a1
...@@ -58,7 +58,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb) ...@@ -58,7 +58,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb)
struct proc_inode *ei; struct proc_inode *ei;
struct inode *inode; struct inode *inode;
ei = (struct proc_inode *)kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL);
if (!ei) if (!ei)
return NULL; return NULL;
ei->pid = NULL; ei->pid = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment