Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1254147pxb; Fri, 18 Feb 2022 04:04:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzujVZnLPq+ehnYmpajOLm0jXf0SFScDRdjsTPwEP9sydtOonNfhAFVHtWKAKBSD5db4lKl X-Received: by 2002:a17:906:30d1:b0:6cf:d160:d8e4 with SMTP id b17-20020a17090630d100b006cfd160d8e4mr6221543ejb.265.1645185891930; Fri, 18 Feb 2022 04:04:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645185891; cv=none; d=google.com; s=arc-20160816; b=BPg0F28/N8QvYYEjEgJ8Xtex9uhnxEbLUqPqtzeAjWO2PwmO5DPFmHGdnVMDyWMHDu 8k7+DfS+NTsmNj4/1Cz8AsMP/e3CFVtPjd1QS4iZ0CLHkTPPidpQ3Sx6lwOCYowuhuM6 yRE7cRy2Qpnx4vDWQ6gMCoUMdZZMBwGPcX1mze/Q0nF5u+rgaBabywGis7nBuzULzIrg DqEzy53KZeAUDhWNuPEKwbHb3uNfVp1JYTHYQ3UA9YhDM4HK5/NSG/r/fIpaMlkupHay CHYthpqPtV7yf07hO5Vw1U0dUtuW2I+iY8VUThx3IkRIIpEYkWkXS/mvCropU2Eca9J2 8Umw== 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=Ckbf6Q/jmsl515Nwvytsj5VQqppc1StpRQJYAIW3rH4=; b=dWWQ0nB/o5gLgOsa+AUyEKLALYLxZWpIkLhg7eWgEyaYUi0pJhmV7d974Of9VDcC63 pLH5rwSWTH7IZygNWV+EK5Iwnb/7XzDB9j3COTlGO7HB62UED3PrEinck3g9w5fSKACw lnr3M2IK0+K491IdlATBRUw1dvTvq9oEXkKwjF5QrlUheecc8R3IqIePlnT/rHHbDFmT UXmAu7H8EO3u32Zj3tSAwLWfkpGFIklw5PeMBAAqxFkYhsxTYkIqtUtWM/Wg5gfVmB+Y OmWtg64Q+2TTOehp7LXtfaaFQhOjgFntwmk4V7xZ9cF+uiKww+v2iAehqkqc/pU4pDDX hPoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=MF5J7O79; 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 ka6si2742742ejc.634.2022.02.18.04.04.26; Fri, 18 Feb 2022 04:04:51 -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=MF5J7O79; 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 S234795AbiBRLip (ORCPT + 99 others); Fri, 18 Feb 2022 06:38:45 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234616AbiBRLgq (ORCPT ); Fri, 18 Feb 2022 06:36:46 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 676D42B1A9D for ; Fri, 18 Feb 2022 03:36:26 -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 2249122498; Fri, 18 Feb 2022 12:36:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1645184184; 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=Ckbf6Q/jmsl515Nwvytsj5VQqppc1StpRQJYAIW3rH4=; b=MF5J7O79LefZ8NaAcl6O+82N7aRVdSO/b0qmyetpC0sl22FIcKg7YwXzA9+HN1/LKaNfxm Yivk1Q/o+JEISrtwWyuNzZcT8n6/AwNu/8fTomzmiSAuVLSLGNDmkF7GmC/2nUvHCgbzcQ XA5xfLG8vw6DoGzwoND0poI6ytUBroc= 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 v2 31/32] mtd: spi-nor: slightly change code style in spi_nor_sr_ready() Date: Fri, 18 Feb 2022 12:36:06 +0100 Message-Id: <20220218113607.1360020-32-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218113607.1360020-1-michael@walle.cc> References: <20220218113607.1360020-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 --- 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