From: Denis Efremov Date: Fri, 25 Oct 2013 11:53:25 +0000 (+0400) Subject: xfs:xfs_dir2_node.c: pointer use before check for null X-Git-Tag: firefly_0821_release~176^2~4901^2~11 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5bf1f439c89d4653f8cc8f8aa303e0d6991aba4b;p=firefly-linux-kernel-4.4.55.git xfs:xfs_dir2_node.c: pointer use before check for null ASSERT on args takes place after args dereference. This assertion is redundant since we are going to panic anyway. Found by Linux Driver Verification project (linuxtesting.org) - PVS-Studio analyzer. Signed-off-by: Denis Efremov Reviewed-by: Ben Myers Signed-off-by: Ben Myers --- diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index f90bf0690346..56369d4509d5 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c @@ -1327,7 +1327,6 @@ xfs_dir2_leafn_split( args = state->args; dp = args->dp; mp = dp->i_mount; - ASSERT(args != NULL); ASSERT(oldblk->magic == XFS_DIR2_LEAFN_MAGIC); error = xfs_da_grow_inode(args, &blkno); if (error) {