From: Colin Ian King Date: Tue, 9 Jan 2018 17:06:40 +0000 (+0000) Subject: ncpfs: remove redundant cast of struct ncp_inode_info X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=24c971c61335cdc5e8fbeeb9dcc2805fa327d040;p=openwrt%2Fstaging%2Fblogic.git ncpfs: remove redundant cast of struct ncp_inode_info Casting a value returned by memory an allocation function is not required and can be removed. Also add in a newline after before the first statement. Code clean up as suggested by coccinelle. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ncpfs/inode.c b/drivers/staging/ncpfs/inode.c index 41de88cdc053..bb411610a071 100644 --- a/drivers/staging/ncpfs/inode.c +++ b/drivers/staging/ncpfs/inode.c @@ -53,7 +53,8 @@ static struct kmem_cache * ncp_inode_cachep; static struct inode *ncp_alloc_inode(struct super_block *sb) { struct ncp_inode_info *ei; - ei = (struct ncp_inode_info *)kmem_cache_alloc(ncp_inode_cachep, GFP_KERNEL); + + ei = kmem_cache_alloc(ncp_inode_cachep, GFP_KERNEL); if (!ei) return NULL; return &ei->vfs_inode;