The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Daniel Baluta <daniel.baluta@intel.com>
Cc: kbuild-all@01.org, Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings
Date: Sat, 27 Dec 2014 07:07:48 +0800	[thread overview]
Message-ID: <20141226230748.GA57100@athens> (raw)
In-Reply-To: <201412270742.z0dX9rhu%fengguang.wu@intel.com>

drivers/iio/imu/kmx61.c:543:1-4: WARNING: end returns can be simpified
drivers/iio/imu/kmx61.c:480:1-4: WARNING: end returns can be simpified if negative or 0 value

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 kmx61.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/iio/imu/kmx61.c
+++ b/drivers/iio/imu/kmx61.c
@@ -540,11 +540,7 @@ static int kmx61_setup_new_data_interrup
 		return ret;
 	}
 
-	ret = kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true);
-	if (ret)
-		return ret;
-
-	return 0;
+	return kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true);
 }
 
 /**

       reply	other threads:[~2014-12-26 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201412270742.z0dX9rhu%fengguang.wu@intel.com>
2014-12-26 23:07 ` kbuild test robot [this message]
2014-12-27  8:05   ` [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings Daniel Baluta

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=20141226230748.GA57100@athens \
    --to=fengguang.wu@intel.com \
    --cc=daniel.baluta@intel.com \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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