From: Yaowei Bai Date: Mon, 9 Nov 2015 22:58:50 +0000 (-0800) Subject: fs/ncpfs/dir.c: remove unnecessary new_valid_dev() check X-Git-Tag: microblaze-4.7-rc1~1074^2~4 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=4467e29f0c48d0fc3e164c39c1eccd1ce230fbe4;p=linux-2.6-microblaze.git fs/ncpfs/dir.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: Petr Vandrovec Cc: Jan Kara Cc: Jens Axboe Cc: Tejun Heo Cc: Fabian Frederick Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 356816e7bc90..f0e3e9e747dd 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -1165,8 +1165,6 @@ out: static int ncp_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) { - if (!new_valid_dev(rdev)) - return -EINVAL; if (ncp_is_nfs_extras(NCP_SERVER(dir), NCP_FINFO(dir)->volNumber)) { ncp_dbg(1, "mode = 0%ho\n", mode); return ncp_create_new(dir, dentry, mode, rdev, 0);