From patchwork Mon Dec 21 12:30:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1419013 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CzzNc71xHz9sVm for ; Mon, 21 Dec 2020 23:31:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CAD5982934; Mon, 21 Dec 2020 13:30:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3395D828A9; Mon, 21 Dec 2020 13:30:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 71BD38282A for ; Mon, 21 Dec 2020 13:30:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=andriy.shevchenko@linux.intel.com IronPort-SDR: 5eJZHbP1hDLASIahWMy8gKdzygKI7mtSjtzIMKv1vHNRPEXmBdzTMqULE679+6Kh1Gillwu1XV YaqiEpoO1bDg== X-IronPort-AV: E=McAfee;i="6000,8403,9841"; a="260447083" X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="260447083" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 04:30:13 -0800 IronPort-SDR: IksaEE5IVc8kHLSP4fbZyUxvT/moGC88DsJ3e9NoxRE8+Bp8RFgv1rRqGbXyM9sSTjtjDzuj1W 4tL0kJp2sfCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="337441982" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 21 Dec 2020 04:30:12 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id D01056A3; Mon, 21 Dec 2020 14:30:09 +0200 (EET) From: Andy Shevchenko To: Tom Rini , U-Boot Mailing List Cc: Andy Shevchenko , Simon Glass Subject: [PATCH v3 8/9] IOMUX: Drop indentation level by removing redundant 'else' Date: Mon, 21 Dec 2020 14:30:07 +0200 Message-Id: <20201221123008.9930-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221123008.9930-1-andriy.shevchenko@linux.intel.com> References: <20201221123008.9930-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass --- v3: added tag common/iomux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/iomux.c b/common/iomux.c index 7991235d1197..126d92ce850f 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -126,12 +126,12 @@ int iomux_doenv(const int console, const char *arg) if (cs_idx == 0) { free(cons_set); return 1; - } else { - /* Works even if console_devices[console] is NULL. */ - free(console_devices[console]); - console_devices[console] = cons_set; - cd_count[console] = cs_idx; } + + /* Works even if console_devices[console] is NULL. */ + free(console_devices[console]); + console_devices[console] = cons_set; + cd_count[console] = cs_idx; return 0; } #endif /* CONSOLE_MUX */