ncpfs: remove redundant cast of struct ncp_inode_info
authorColin Ian King <colin.king@canonical.com>
Tue, 9 Jan 2018 17:06:40 +0000 (17:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Jan 2018 18:34:12 +0000 (19:34 +0100)
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 <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ncpfs/inode.c

index 41de88cdc053fa4c6f8921cd2ee29f1a911642a4..bb411610a0711eaf4362453c670618c946650405 100644 (file)
@@ -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;