public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: kbuild-all@01.org, Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] power: max77693: fix simple_return.cocci warnings
Date: Wed, 21 Jan 2015 12:11:34 +0800	[thread overview]
Message-ID: <20150121041134.GA205386@athens> (raw)
In-Reply-To: <201501211232.F4NwbEWo%fengguang.wu@intel.com>

drivers/power/max77693_charger.c:615:1-4: WARNING: end returns can be simpified

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

CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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

--- a/drivers/power/max77693_charger.c
+++ b/drivers/power/max77693_charger.c
@@ -612,12 +612,8 @@ static int max77693_reg_init(struct max7
 	if (ret)
 		return ret;
 
-	ret = max77693_set_charge_input_threshold_volt(chg,
+	return max77693_set_charge_input_threshold_volt(chg,
 			chg->charge_input_threshold_volt);
-	if (ret)
-		return ret;
-
-	return 0;
 }
 
 #ifdef CONFIG_OF

       reply	other threads:[~2015-01-21  4:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201501211232.F4NwbEWo%fengguang.wu@intel.com>
2015-01-21  4:11 ` kbuild test robot [this message]
2015-01-21  7:59   ` [PATCH] power: max77693: fix simple_return.cocci warnings Krzysztof Kozlowski
2015-01-21 13:05   ` Sebastian Reichel
2015-01-21  4:11 ` [PATCH] power: max77693: fix platform_no_drv_owner.cocci warnings kbuild test robot
2015-01-21  7:58   ` Krzysztof Kozlowski
2015-01-21 13:05   ` Sebastian Reichel

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=20150121041134.GA205386@athens \
    --to=fengguang.wu@intel.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=k.kozlowski@samsung.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /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