Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3923869pxb; Mon, 21 Feb 2022 08:24:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxw2Q0H08Egjx7q8+G7g72c9pE6+lYqO8bK02p5WtXN7VFNUYzR5nvA1ZYsvNSTCXVFcWp+ X-Received: by 2002:a17:906:8157:b0:6cd:88f7:41d with SMTP id z23-20020a170906815700b006cd88f7041dmr17167358ejw.301.1645460647900; Mon, 21 Feb 2022 08:24:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645460647; cv=none; d=google.com; s=arc-20160816; b=JFEQt+jn6+Qr9M22+y3igDyHUK2vRT+1W/x9DDNCVsKYWOxbIfd/DHhqSBbvnFqfNT qFm7XRlD4ynO9DyLTn8RoYlzFoNdCqu6ivS9uPoqp9rLazgjyJIODC6KhD/v+HbmLu8a yp3xWN1eTpd9B/23gYEEGqiDYwm0yrq1YMc2zuV9PryiEI7eW68UIEGRNGw5kKvVyVp5 X/BthDSyqKdbcUtg1xWqFB0EddfRiLQD+EoDOcQSCYcMLPZElMW11wdp5CqP9rDK0HJw YpfsAZAKtk3bAqvrrBnwrIFMkizQHnOm/1u98PEADzT9T/5DQWwjxqQqDD2gcoT33Jqn VHpg== 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=HALmHM+8L+4XVFtTU7TVBjF2uR7kGnZZZEW7ou9vPIohKa2e4qySVqlB1xUwtWuknl dDTmGI1tOT/eB3j1GMqqWO9BDycG/w8LYeN9qfPcNVqUqdOsUHYvIAVUiHonDa9+5/+K Ux7eXBItTCualr4+6MfDOdHl49e+NtbKecvDTVmChxdmt1Z+wTCejjStAT9ILJsytB/A I+3LESMKzGOrkqjQ+kY0Wtd78rCA36UazeSI8u8irNAUEIBzsg22T6X+gpnxP1PxFWk8 iu/Hap/erfa52vJ6+63wyOi9rPm8O2nEYo5mtBdgtpgbC4WTd+RtaDuxmx40511FLJtK STwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Fh6Zpioi; 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 k6si4401737edi.359.2022.02.21.08.23.45; Mon, 21 Feb 2022 08:24:07 -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=Fh6Zpioi; 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 S1346300AbiBUI5I (ORCPT + 99 others); Mon, 21 Feb 2022 03:57:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345772AbiBUIyR (ORCPT ); Mon, 21 Feb 2022 03:54:17 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BD26237D4 for ; Mon, 21 Feb 2022 00:53:05 -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 E39E92241C; Mon, 21 Feb 2022 09:53:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1645433584; 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=Fh6ZpioiI5c5gfiMotj2uaPHz4ZDQJRvZZIyh53cDvssa5ZUH5lhdBplUM+Tg31nQlaVXD RKzLsffsGHfrN5DF7gy1iW47Wqi8+gTWscAwKplvRJk4FjmWS4SPwCWQeXZggDZ/J21Me3 yUlN5FjqGD2NIbNvzzl2ainUga9GX8g= 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 v3 31/32] mtd: spi-nor: slightly change code style in spi_nor_sr_ready() Date: Mon, 21 Feb 2022 09:52:35 +0100 Message-Id: <20220221085236.1452024-32-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220221085236.1452024-1-michael@walle.cc> References: <20220221085236.1452024-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