From patchwork Wed Jan 21 04:11:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 5674311 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9ACB99F358 for ; Wed, 21 Jan 2015 04:11:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DFD15204DF for ; Wed, 21 Jan 2015 04:11:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76273204D2 for ; Wed, 21 Jan 2015 04:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753840AbbAUELs (ORCPT ); Tue, 20 Jan 2015 23:11:48 -0500 Received: from mga11.intel.com ([192.55.52.93]:15110 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753757AbbAUELr (ORCPT ); Tue, 20 Jan 2015 23:11:47 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 20 Jan 2015 20:11:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,439,1418112000"; d="scan'208";a="640210074" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga001.jf.intel.com with ESMTP; 20 Jan 2015 20:11:45 -0800 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1YDmds-0003CL-ND; Wed, 21 Jan 2015 12:11:44 +0800 Date: Wed, 21 Jan 2015 12:11:34 +0800 From: kbuild test robot To: Krzysztof Kozlowski Cc: kbuild-all@01.org, Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] power: max77693: fix simple_return.cocci warnings Message-ID: <20150121041134.GA205386@athens> References: <201501211232.F4NwbEWo%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201501211232.F4NwbEWo%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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 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 Signed-off-by: Fengguang Wu Reviewed-by: Krzysztof Kozlowski --- max77693_charger.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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