There's already an early exit statement triggered by "inode" being NULL. Drop an extra check that will always be true. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- fs/ramfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ramfs.c b/fs/ramfs.c index eec7cfb5b..7e7dc7aca 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -131,10 +131,8 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode) if (!inode) return -ENOSPC; - if (inode) { - d_instantiate(dentry, inode); - dget(dentry); /* Extra count - pin the dentry in core */ - } + d_instantiate(dentry, inode); + dget(dentry); /* Extra count - pin the dentry in core */ return 0; } -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox