X-Received: by 2002:a05:6a00:13a4:b0:4ce:118f:a822 with SMTP id t36-20020a056a0013a400b004ce118fa822mr1034787pfg.33.1645642575189; Wed, 23 Feb 2022 10:56:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645642575; cv=none; d=google.com; s=arc-20160816; b=aZdKR8ZS4U31d+vdBVRt5zWrOUbCNsxOs6BEyQL6HEwCUCSOBpg8MYB0i/QeBJ4pDY gjcjgSVlBm4KdSPRL9m+MWAP4K91mWCHngbkL3oGJC1x3CtSXQgv3ftXCRcpwSVqNX6j zAG9vMok6I8BZbGa7WcatEKl8FO8RDdJhIrLTNK3KJ7jNqbo+EGw0mBUE9QKI+ksxUnR YVwyXODy6xe2L/Mt9sDxijNWaNSPgXntmDZPQeVm3ZXcIAN++3pnn3iBOa4zmhk5Z36w MZ9dlcHVYqZGrx8m585tEBrLXWgYgLOPjipzjUz4hbESKcEhnU8omOvQdrqt0InrhMtI Z+9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=acuMMmcA9VmQZOASvU5gU9zXugIenhc8Io0FNHjds/g=; b=v+zCXRqsydQpeR8X43u00SAkXqwm4003/lKYN/AkCFo2RCkSyjiC9E0agvb8p5eoGK UqTUAhjYnhEWt6sfVL6dY3sbJGXsqex2UpZzzmcNqVGe8JI3S1tKB4ZA0TUs1JsG2PRv ZEyZyPtPZjFpMNfW5pssZi6cw9r/mm1slGwq9OyqYfAFJOVMxQjJRYdokF8eYvNUemUg HqZSUyQ45Zof1zP9GC/ckV+Ly9RixyyOIbCP8CGX/RTeBbHPgqj9eT3KlAJGvdIZnECu KSErNEEdHxGP0+vpqPUIlvsN1RTaxxFv8gJBlRbeaVrh1jE1CR3I01vtUCoY567TJ3iK TwMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="paHkoDs/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8si319491pfa.193.2022.02.23.10.55.59; Wed, 23 Feb 2022 10:56:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="paHkoDs/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236185AbiBWNqP (ORCPT + 99 others); Wed, 23 Feb 2022 08:46:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241099AbiBWNox (ORCPT ); Wed, 23 Feb 2022 08:44:53 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B901AD115 for ; Wed, 23 Feb 2022 05:44:19 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 7957E22481; Wed, 23 Feb 2022 14:44:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1645623857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=acuMMmcA9VmQZOASvU5gU9zXugIenhc8Io0FNHjds/g=; b=paHkoDs/LU+X1CypVRs/Xr2CBe9Nchjuoqk/jB4dgSJ2oQTpEGFVeN82iQ/prsK2Ye7bdR IewnijdV27Tlu7/0fSYTcjxdRFsOB1x0YUIidGJlu7k3mcdYrTWH3yhrOclmPZ0TLJ9Oaw vLitYBad6NqYWRfIo6QqzwPFBJXNlaI= From: Michael Walle To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , yaliang.wang@windriver.com, Michael Walle Subject: [PATCH v5 31/32] mtd: spi-nor: slightly change code style in spi_nor_sr_ready() Date: Wed, 23 Feb 2022 14:43:57 +0100 Message-Id: <20220223134358.1914798-32-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220223134358.1914798-1-michael@walle.cc> References: <20220223134358.1914798-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that there is almost no special case code left in spi_nor_sr_ready(), the return check looks odd. Move the function call closer to the return code checking. Signed-off-by: Michael Walle Reviewed-by: Pratyush Yadav --- drivers/mtd/spi-nor/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index f5a2f37d140e..9014008e60b3 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -563,8 +563,9 @@ int spi_nor_write_ear(struct spi_nor *nor, u8 ear) */ int spi_nor_sr_ready(struct spi_nor *nor) { - int ret = spi_nor_read_sr(nor, nor->bouncebuf); + int ret; + ret = spi_nor_read_sr(nor, nor->bouncebuf); if (ret) return ret; -- 2.30.2