From: Yaowei Bai Date: Wed, 21 Oct 2015 22:13:27 +0000 (+1100) Subject: fs/hpfs/namei.c: remove unnecessary new_valid_dev() check X-Git-Tag: KARO-TXUL-2015-12-04~30^2~7 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=156df820c437badb8480cf7bd84c8a4758e1767f fs/hpfs/namei.c: remove unnecessary new_valid_dev() check new_valid_dev() always returns 1, so the !new_valid_dev() check is not needed. Remove it. Signed-off-by: Yaowei Bai Cc: Alexander Viro Cc: Mikulas Patocka Signed-off-by: Andrew Morton --- diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 9e92c9c2d319..ae4d5a1fa4c9 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -227,8 +227,6 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de int err; if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err; if (hpfs_sb(dir->i_sb)->sb_eas < 2) return -EPERM; - if (!new_valid_dev(rdev)) - return -EINVAL; hpfs_lock(dir->i_sb); err = -ENOSPC; fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh);