Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1154692imu; Mon, 5 Nov 2018 15:02:13 -0800 (PST) X-Google-Smtp-Source: AJdET5cCgw254q2vpiLJZw5TFs61A46KUIvyn06SU0usYh4SLNzJUbx/0qncpu52sfnNLiugUg3S X-Received: by 2002:a63:e445:: with SMTP id i5mr19009050pgk.307.1541458933653; Mon, 05 Nov 2018 15:02:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541458933; cv=none; d=google.com; s=arc-20160816; b=PtDQlmo0lNlGDN7TE7OIPar05xEBhGCQr6Tw189l3IBU9QgrsJjHGhJAtFR8zZFylq gUndVUVdhyQqgmlulXsMO8aXx96V5rG2eOSPoBtd00U10LRmG3WgnwO7cYhqnB/Hf93L C+OxnjoZ+qSYJue+3HFv56KSn6HodmzSVrnQhvpkBHkkvAtAKc97BQR77ZXmrg/YgEC/ QI8v9Mm1PiSWNYioMFpf/kRV5A5AINBJKlBdCkaA4C98pexovaMQF1z1As9LXtqZwR/f rUNWQnFFVJ1qfKZNFQM0Gtk6ycALKhRl8J252pzlGE6eeG/QUjhoEaTeLsWx7JJ1l2ZG 5EPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=BUE1rd9/T2mcJo7FiXlWUTJUbmaZEfqAPx9ImENjiUY=; b=TZfXjMmCB5lfLFi1R8Y0Ih2Q/GatKamBTQTglIUtCc3WPT58cBRyVgj7a11vqSChbO uMdOYi1Y6MkP63R/s1kY2j+17M/OC29XzKX4M3XgA0rFvQglfqleZArZDrbYaANBhrXf O1+boyDSY5Aa9T0YktRH+NvkgBR4ON7C8i+LBvsfelhRe4Z7GI41lHXnNm61MBnGIaiH b3gVOcdB72h6ARcYV1QvBxooXMyBuV8mpzjyUfRQ1z7FdWiES6h1ihGGMjSKsUJTb9M8 jqKiJyppJCLfImwMtL1/784rKkrSzkXSdmNDRXHvBMuOrqBEFgTDBe+0Gg/E4+GjSFMI cCEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b72-v6si42185687pfm.100.2018.11.05.15.01.58; Mon, 05 Nov 2018 15:02:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727254AbeKFIXO (ORCPT + 99 others); Tue, 6 Nov 2018 03:23:14 -0500 Received: from mail.bootlin.com ([62.4.15.54]:59450 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725726AbeKFIXO (ORCPT ); Tue, 6 Nov 2018 03:23:14 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id E34EE207F4; Tue, 6 Nov 2018 00:01:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 9B3892072A; Tue, 6 Nov 2018 00:00:59 +0100 (CET) Date: Tue, 6 Nov 2018 00:00:59 +0100 From: Boris Brezillon To: Christophe JAILLET Cc: marek.vasut@gmail.com, dwmw2@infradead.org, computersforpeace@gmail.com, richard@nod.at, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] mtd: spi-nor: cadence-quadspi: Fix the return value in case of error in 'cqspi_direct_read_execute()' Message-ID: <20181106000059.4cc1d10e@bbrezillon> In-Reply-To: <20181016071346.25383-1-christophe.jaillet@wanadoo.fr> References: <20181016071346.25383-1-christophe.jaillet@wanadoo.fr> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Oct 2018 09:13:46 +0200 Christophe JAILLET wrote: > We return 0 unconditionally in 'cqspi_direct_read_execute()'. > However, 'ret' is set to some error codes in several error handling paths. > > Return 'ret' instead to propagate the error code. > > Fixes: ffa639e069fb ("mtd: spi-nor: cadence-quadspi: Add DMA support for direct mode reads") > Signed-off-by: Christophe JAILLET Queued to the fixes branch after adjusting the subject to make it shorter and adding a Cc-stable tag. Thanks, Boris > --- > drivers/mtd/spi-nor/cadence-quadspi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c > index 8e714fbfa521..6e9cbd1a0b6d 100644 > --- a/drivers/mtd/spi-nor/cadence-quadspi.c > +++ b/drivers/mtd/spi-nor/cadence-quadspi.c > @@ -996,7 +996,7 @@ static int cqspi_direct_read_execute(struct spi_nor *nor, u_char *buf, > err_unmap: > dma_unmap_single(nor->dev, dma_dst, len, DMA_DEV_TO_MEM); > > - return 0; > + return ret; > } > > static ssize_t cqspi_read(struct spi_nor *nor, loff_t from,