From patchwork Wed Jun 24 15:00:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 6668541 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C62D3C05AC for ; Wed, 24 Jun 2015 15:02:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 111D92053D for ; Wed, 24 Jun 2015 15:02:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06C8F20465 for ; Wed, 24 Jun 2015 15:02:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbbFXPCI (ORCPT ); Wed, 24 Jun 2015 11:02:08 -0400 Received: from mga09.intel.com ([134.134.136.24]:5824 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbbFXPCH (ORCPT ); Wed, 24 Jun 2015 11:02:07 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 24 Jun 2015 08:02:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,672,1427785200"; d="scan'208";a="513563290" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by FMSMGA003.fm.intel.com with ESMTP; 24 Jun 2015 08:02:00 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1Z7mBR-000Sey-GY; Wed, 24 Jun 2015 23:01:49 +0800 Date: Wed, 24 Jun 2015 23:00:49 +0800 From: kbuild test robot To: Trond Myklebust Cc: kbuild-all@01.org, Jeff Layton , Peng Tao , linux-nfs@vger.kernel.org Subject: [PATCH] fix ptr_ret.cocci warnings Message-ID: <20150624150049.GA60090@xian> References: <201506242346.OCI4AVtF%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201506242346.OCI4AVtF%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fs/nfs/nfs42proc.c:191:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu --- nfs42proc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -188,7 +188,5 @@ int nfs42_proc_layoutstats_generic(struc nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0); task = rpc_run_task(&task_setup); - if (IS_ERR(task)) - return PTR_ERR(task); - return 0; + return PTR_ERR_OR_ZERO(task); }