Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751564AbaLZXJH (ORCPT ); Fri, 26 Dec 2014 18:09:07 -0500 Received: from mga11.intel.com ([192.55.52.93]:58767 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbaLZXJF (ORCPT ); Fri, 26 Dec 2014 18:09:05 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,649,1413270000"; d="scan'208";a="660762406" Date: Sat, 27 Dec 2014 07:07:48 +0800 From: kbuild test robot To: Daniel Baluta Cc: kbuild-all@01.org, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings Message-ID: <20141226230748.GA57100@athens> References: <201412270742.z0dX9rhu%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412270742.z0dX9rhu%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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Fengguang Wu --- 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); } /** -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/