Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953573pxk; Mon, 21 Sep 2020 01:06:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+wFWv8e5YgHlCPexKajQPyrRjZJFsQyPZ+XWAaPnCpaKAiMpaetA5D/7n3ck2G7cNaGA9 X-Received: by 2002:a50:dec9:: with SMTP id d9mr51136787edl.145.1600675561285; Mon, 21 Sep 2020 01:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675561; cv=none; d=google.com; s=arc-20160816; b=xlwFJ1+hK/c5ZdpN9EauW5CTEvzOZMUovYqtzihaThxnFUoBmzhE/2Lmpns8duvLC2 bubKyUl2qjUKOe1VoEnFvsZ2olqnnaR4gN3AQU3vEDb4c19zVxWS9dOuvVMq0lj2sf8h Kvcp/SLbJaSUB5GqkchK5LjjzkKXrbKf86RErYIS9v/nhrrMtuDbtwsZa/bD2Sh7K/Ea 8wQWQbB4Tc1YHoaPfvo5SMCIRRr9OtOhuAtXMq6x0sG7pojDXhOCc8ttG9DBkB2YZeaT vBHDrgwQy/YPcItaJF0C6eNyEl6B4IoIRf7kDisrZxnMY9RvTO56qTKIsbNJOWE9PJ3X Bvfg== 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 :message-id:date:subject:cc:to:from; bh=THK+8Nk0RY8FV01o77Co8E0I0OGkwFVbyzpVxSWmnFQ=; b=haIdj1ccZwZ8QXQzO/SAjdscgOB/Oq1eO00sbHUnbtGymefs9UZxaEVBJbEaTcKZlA BIB03GLlTpPtvQl03OotDw/x4oE2CKbUzJWfn3w+ac46wTAufnQngBRY5dr7gBpp3QOG fwo1VqHCTKV/S9UhVj3ApbGUVS+CN7iQLHV8qp06svr9B62kjfiIH3JRvwyMdcVMtkJj AxaDV4Fd5rTnKZMYXh7Yw3RK+Ra9xx6Wh/7BnsfcrnoKwByDF7hiQ8+WeM2d/EGqPJmd g0zxfazGGZr0soyRdI2brSsJwytfR7DW2QQqgoyGHOFPXkqpljL8r1iNXqgOUn33bNyp ympQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si7592692eds.475.2020.09.21.01.05.38; Mon, 21 Sep 2020 01:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726664AbgIUIDU (ORCPT + 99 others); Mon, 21 Sep 2020 04:03:20 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35492 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726632AbgIUICa (ORCPT ); Mon, 21 Sep 2020 04:02:30 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7BA9BF056ABF7664D857; Mon, 21 Sep 2020 16:02:28 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:17 +0800 From: Liu Shixin To: Kyungmin Park , Miquel Raynal , Richard Weinberger , "Vignesh Raghavendra" CC: , , "Liu Shixin" Subject: [PATCH -next] mtd: onenand_base: simplify the return expression of onenand_transfer_auto_oob Date: Mon, 21 Sep 2020 16:24:41 +0800 Message-ID: <20200921082441.2591669-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/mtd/nand/onenand/onenand_base.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/onenand/onenand_base.c b/drivers/mtd/nand/onenand/onenand_base.c index ec18ade33262..188b8061e1f7 100644 --- a/drivers/mtd/nand/onenand/onenand_base.c +++ b/drivers/mtd/nand/onenand/onenand_base.c @@ -1052,16 +1052,11 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col int thislen) { struct onenand_chip *this = mtd->priv; - int ret; this->read_bufferram(mtd, ONENAND_SPARERAM, this->oob_buf, 0, mtd->oobsize); - ret = mtd_ooblayout_get_databytes(mtd, buf, this->oob_buf, - column, thislen); - if (ret) - return ret; - - return 0; + return mtd_ooblayout_get_databytes(mtd, buf, this->oob_buf, + column, thislen); } /** -- 2.25.1