Skip to content

Commit

Permalink
fs/ncpfs/dir.c: remove unnecessary new_valid_dev() check
Browse files Browse the repository at this point in the history
new_valid_dev() always returns 1, so the !new_valid_dev() check is not
needed.  Remove it.

Signed-off-by: Yaowei Bai <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Petr Vandrovec <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Fabian Frederick <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
baihuahua authored and torvalds committed Nov 9, 2015
1 parent a2a1704 commit 4467e29
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/ncpfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,6 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
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);
Expand Down

0 comments on commit 4467e29

Please sign in to comment.