Return-Path: Received: from mga17.intel.com ([192.55.52.151]:58459 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbeKUAGY (ORCPT ); Tue, 20 Nov 2018 19:06:24 -0500 Date: Tue, 20 Nov 2018 21:36:40 +0800 From: kbuild test robot To: Theodore Ts'o Cc: kbuild-all@01.org, Ext4 Developers List , Theodore Ts'o , stable@kernel.org Subject: [PATCH] ext4: fix odd_ptr_err.cocci warnings Message-ID: <20181120133640.GA59775@lkp-sb-ep06> References: <20181117233523.8832-1-tytso@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181117233523.8832-1-tytso@mit.edu> Sender: linux-ext4-owner@vger.kernel.org List-ID: From: kbuild test robot fs/ext4/resize.c:999:6-12: inconsistent IS_ERR and PTR_ERR on line 1000. PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call to IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: 0212baa67119 ("ext4: add ext4_sb_bread() to disambiguate ENOMEM cases") CC: Theodore Ts'o Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Theodore-Ts-o/ext4-add-ext4_sb_bread-to-disambiguate-ENOMEM-cases/20181120-070629 base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev Please take the patch only if it's a positive warning. Thanks! resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -997,7 +997,7 @@ static int reserve_backup_gdb(handle_t * } primary[res] = ext4_sb_bread(sb, blk); if (IS_ERR(primary[res])) { - err = PTR_ERR(res); + err = PTR_ERR(primary[res]); primary[res] = NULL; goto exit_bh; }