From patchwork Thu Dec 7 14:14:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 751471 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IxqCTkaF" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A74E1708; Thu, 7 Dec 2023 06:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701958646; x=1733494646; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HriWS+6rKR56xLxTFH38aF8Vg3InXBxiKv23eQ6ZDgg=; b=IxqCTkaFENI4IYY8LfNPIYKBurp6ItPeOACeF74CugTKoB9pPDAo/LBp 0rtd6l3bRomYLmc4sZsTtXmy87sj5KbMP5y4ZxtysplxjUOcz8mD1nwpb Rx2/GKTbuyzvd5dt7KXRttlvN5FK+2cvSTAZPSsctUDCxGTOpkfBjKojR D5LntU33O5VEn8Kx+bm//8w1yI2tcvgqdlEMmdSXXrHdJb96gSbX3OLLK 93wXxRxgnmQHsxLdf6i6zshoddQEQPjOta4hVHHxibMa7vUYZjfTMU+8h /l5wUR1TjyAjhS5orytt/DUjd8y7I4zoivk2sub1e1UJ1lOXBuPwuRMrm Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="460726223" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="460726223" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:17:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="889756109" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="889756109" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 07 Dec 2023 06:17:12 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8A442D50; Thu, 7 Dec 2023 16:17:03 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Philipp Zabel , Serge Semin Subject: [PATCH v5 23/24] i2c: designware: Get rid of redundant 'else' Date: Thu, 7 Dec 2023 16:14:03 +0200 Message-ID: <20231207141653.2785124-24-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> References: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Reviewed-by: Andi Shyti Reviewed-by: Mario Limonciello Tested-by: Serge Semin Acked-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231120144641.1660574-24-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index 45ced3354eef..b8e5d56473d6 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -639,10 +639,10 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev) if (abort_source & DW_IC_TX_ARB_LOST) return -EAGAIN; - else if (abort_source & DW_IC_TX_ABRT_GCALL_READ) + if (abort_source & DW_IC_TX_ABRT_GCALL_READ) return -EINVAL; /* wrong msgs[] data */ - else - return -EIO; + + return -EIO; } int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev)