mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Fengguang Wu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: boon.leong.ong@intel.com, mingo@kernel.org,
	dvhart@linux.intel.com, linux-kernel@vger.kernel.org,
	hpa@zytor.com, andy.schevchenko@gmail.com,
	fengguang.wu@intel.com, tglx@linutronix.de,
	pure.logic@nexus-software.ie
Subject: [tip:x86/platform] x86/intel/quark: Fix ptr_ret.cocci warnings
Date: Thu, 19 Feb 2015 03:31:29 -0800	[thread overview]
Message-ID: <tip-32d39169d7f56849b8c6c8c51aca7b73194d05f1@git.kernel.org> (raw)
In-Reply-To: <20150219081432.GA21983@waimea>

Commit-ID:  32d39169d7f56849b8c6c8c51aca7b73194d05f1
Gitweb:     http://git.kernel.org/tip/32d39169d7f56849b8c6c8c51aca7b73194d05f1
Author:     Fengguang Wu <fengguang.wu@intel.com>
AuthorDate: Thu, 19 Feb 2015 16:14:32 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 19 Feb 2015 10:00:54 +0100

x86/intel/quark: Fix ptr_ret.cocci warnings

arch/x86/platform/intel-quark/imr.c:280: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 <fengguang.wu@intel.com>
Cc: Andy Shevchenko <andy.schevchenko@gmail.com>
Cc: Ong, Boon Leong <boon.leong.ong@intel.com>
Cc: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: kbuild-all@01.org
Link: http://lkml.kernel.org/r/20150219081432.GA21983@waimea
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/intel-quark/imr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/platform/intel-quark/imr.c b/arch/x86/platform/intel-quark/imr.c
index 16e4df1..60c01eb 100644
--- a/arch/x86/platform/intel-quark/imr.c
+++ b/arch/x86/platform/intel-quark/imr.c
@@ -277,10 +277,7 @@ static int imr_debugfs_register(struct imr_device *idev)
 {
 	idev->file = debugfs_create_file("imr_state", S_IFREG | S_IRUGO, NULL,
 					 idev, &imr_state_ops);
-	if (IS_ERR(idev->file))
-		return PTR_ERR(idev->file);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(idev->file);
 }
 
 /**

      parent reply	other threads:[~2015-02-19 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201502191606.pTcFEBOs%fengguang.wu@intel.com>
2015-02-19  8:14 ` [PATCH] x86/intel/quark: fix simple_return.cocci warnings kbuild test robot
2015-02-19 10:11   ` Bryan O'Donoghue
2015-02-19 10:25     ` Ingo Molnar
2015-02-19 10:31       ` Bryan O'Donoghue
2015-02-19 10:33         ` Ingo Molnar
2015-02-19 11:01           ` Bryan O'Donoghue
2015-02-19 11:31   ` [tip:x86/platform] x86/intel/quark: Fix " tip-bot for Fengguang Wu
2015-02-19  8:14 ` [PATCH] x86/intel/quark: fix ptr_ret.cocci warnings kbuild test robot
2015-02-19 10:12   ` Bryan O'Donoghue
2015-02-19 11:31   ` tip-bot for Fengguang Wu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-32d39169d7f56849b8c6c8c51aca7b73194d05f1@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=andy.schevchenko@gmail.com \
    --cc=boon.leong.ong@intel.com \
    --cc=dvhart@linux.intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pure.logic@nexus-software.ie \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome