From patchwork Sat Jul 9 21:16:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12912318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21746CCA482 for ; Sat, 9 Jul 2022 21:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229564AbiGIVQy (ORCPT ); Sat, 9 Jul 2022 17:16:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiGIVQv (ORCPT ); Sat, 9 Jul 2022 17:16:51 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3950E03C; Sat, 9 Jul 2022 14:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657401410; x=1688937410; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NJDMm0L4h/dOQ6h5gnqt5/SsVOUXEVrkRUats68PgGs=; b=Yh5dsTUffq2fvCaqJq1CbO1+ZpIav6NJN/4bzIhOFqwyZn+lEEli9jwF cISCmWk9Pe9dtUAoPN6ZnlZksVjvyUFCfMLRd3DLJormkC2XJkaGhO70D VJzpBIU4Rdlb1PsQe7UflZ25qD4nyopjVbt/tQaC5Kt0MZ9Cnpcm31zQM nVhQo+6Wwt9GDNH3Mx8NMnV5f/4gpCrZIZZ45sfSpWIIBUwrDzyen4P7m nNIsISZwASkAoz5Ww8qaFKnla7MaD2gGyg7iUhQBh/WFkWBmloziozClR ItiEcIlMBsaMM/8hgGU8e33yRcxTvxDxQY0+XTQxM4t2PyKPLwlYgmg1E Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10403"; a="264872815" X-IronPort-AV: E=Sophos;i="5.92,259,1650956400"; d="scan'208";a="264872815" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2022 14:16:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,259,1650956400"; d="scan'208";a="683991134" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 09 Jul 2022 14:16:47 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DB7B65CC; Sun, 10 Jul 2022 00:16:54 +0300 (EEST) From: Andy Shevchenko To: Hans de Goede , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Gross , Andy Shevchenko Subject: [PATCH v2 5/6] platform/x86: serial-multi-instantiate: Get rid of redundant 'else' Date: Sun, 10 Jul 2022 00:16:52 +0300 Message-Id: <20220709211653.18938-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220709211653.18938-1-andriy.shevchenko@linux.intel.com> References: <20220709211653.18938-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede --- v2: added tag (Hans) drivers/platform/x86/serial-multi-instantiate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c index 0a2335693f4f..24f915bbdec1 100644 --- a/drivers/platform/x86/serial-multi-instantiate.c +++ b/drivers/platform/x86/serial-multi-instantiate.c @@ -98,7 +98,7 @@ static int smi_spi_probe(struct platform_device *pdev, struct smi *smi, ret = acpi_spi_count_resources(adev); if (ret < 0) return ret; - else if (!ret) + if (!ret) return -ENOENT; count = ret; @@ -180,7 +180,7 @@ static int smi_i2c_probe(struct platform_device *pdev, struct smi *smi, ret = i2c_acpi_client_count(adev); if (ret < 0) return ret; - else if (!ret) + if (!ret) return -ENOENT; count = ret;