From: Dan Carpenter Date: Mon, 20 Feb 2012 22:53:06 +0000 (-0500) Subject: ext4: using PTR_ERR() on the wrong variable in ext4_ext_migrate() X-Git-Tag: upstream/snapshot3+hdmi~7852^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0cc910f15027fbd731e78f3437cc076eebc22e9;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ext4: using PTR_ERR() on the wrong variable in ext4_ext_migrate() "inode" is a valid pointer here. "tmp_inode" was intended. Signed-off-by: Dan Carpenter Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index e7d6bb0..f39f80f 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -471,7 +471,7 @@ int ext4_ext_migrate(struct inode *inode) tmp_inode = ext4_new_inode(handle, inode->i_sb->s_root->d_inode, S_IFREG, NULL, goal, owner); if (IS_ERR(tmp_inode)) { - retval = PTR_ERR(inode); + retval = PTR_ERR(tmp_inode); ext4_journal_stop(handle); return retval; }