Re: [PATCH] fs: ocfs2: dir.c: Cleaning up uninitialized variables

2014-06-02 Thread Rickard Strandqvist
Hi Yes, but if() above, there may be a: goto out; Or if kcalloc() fails in ocfs2_dx_dir_kmalloc_leaves() the variable num_dx_leaves will not be set to any value. But now that I look more carefully at it, I see that in the cases orig_dx_leaves and new_dx_leaves ar NULL, so nothing will happen in

Re: [PATCH] fs: ocfs2: dir.c: Cleaning up uninitialized variables

2014-06-02 Thread Andrew Morton
On Sun, 1 Jun 2014 15:53:04 +0200 Rickard Strandqvist wrote: > There is a risk that the variable will be used without being initialized. um, no there isn't. > --- a/fs/ocfs2/dir.c > +++ b/fs/ocfs2/dir.c > @@ -3738,7 +3738,7 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super > *osb, stru

Re: [PATCH] fs: ocfs2: dir.c: Cleaning up uninitialized variables

2014-06-02 Thread Srinivas Eeda
Acked-by: Srinivas Eeda On 06/01/2014 06:53 AM, Rickard Strandqvist wrote: There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- fs/ocfs2/dir.c |2