Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp273775ybi; Wed, 29 May 2019 21:08:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBTWqSxi/9njHpCQW0SCQ3EDmz4/qJkVd2iTKiyNZ0zdEozYP61Lp9z4FSqB1r4f/vB+wK X-Received: by 2002:a17:902:8648:: with SMTP id y8mr1921819plt.30.1559189332551; Wed, 29 May 2019 21:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189332; cv=none; d=google.com; s=arc-20160816; b=K93rjvdYVimg49tr7T120cCfXmB9/C2RSZzY5e+P/7mzq64GnuTniFcbySzmatqcKM 8wYpqrej2MqMi6EwKYemm6Unrcz7n2hGH2UBHmhuzQHdLFvqxjCsl58Sg3iAAA39F+as Un6DQ4XVVGWuaBWReK2keJs+vbLGsXF1chlEC+uCv4Tdu6l98Odn0CvRka9IhwyFOcuZ tbHejALpPitXzcm4+AU6UeidGaLsBQ5kjU4DT6m+p0vw2Ldtb/wnHbE1nqMSIBaeqxhY PTwQNFH/gQvJQ6ivrmin7Cq4Xkqgl0Lb3Ci5lo8rvetsLrh/YXXyIEoupumKmCNH1i31 iw0A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vYrl/dF2VnwkQ567IVa2nmVQy5ZTrxfICmNFoogyFIg=; b=0GWHoCdxSgngmMW+Sdbx35YOniHOjciiFbMd/CC8WRHrGox6cVnB+21QwvV9l2zKb8 JdAO0YAkTpif3eZoQvpjlTpmJubWNdMB/jwIJNs/klU5fs1QHicujHcAhvZjQ3t8s3Vg USMoumFTmI+TSsDtd0HN+W7nlYor8rTekWG/EyQ9hrwSRHYFoML9hA+qYAZ5vCCK3sgG d4FTzMWBVuo/XL4KUWIDuyFLV9EGssJz5zVtHQ4ZRQAhM7iOTxukurZL/Ye0fJqvV49Q K4m91ukucKVttJ5vDyZX2wEt7KJiOIlzyGXaegkc8VlV24JGu6YRwcNCrWyPOyghwcuL 7F+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="u/wNfpMy"; 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 ca10si2035935plb.172.2019.05.29.21.08.37; Wed, 29 May 2019 21:08:52 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="u/wNfpMy"; 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 S1727074AbfE3EHk (ORCPT + 99 others); Thu, 30 May 2019 00:07:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730218AbfE3DR1 (ORCPT ); Wed, 29 May 2019 23:17:27 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C9BE23B30; Thu, 30 May 2019 03:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186247; bh=TidmviLasrXwEKeg9q8yiiOaA0/c+twSVlsSQWk3Ed4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u/wNfpMylY4vPofAH0Cy53/IuaZHDhs9Ks3bz5WKOaWylSXPwUD6WAjogGl6RvgcZ Yj9RcOQM1fWKM6Sy5Dz/kH4XCdaa6h14eVHdcf0dkMVucfF//LcW6yjck2xtAh2LJF I3A3uLrfrn1x1jM526FJ/HfNg39T0K6B4p3oitvU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , Laurent Pinchart , Ulf Hansson , Sasha Levin Subject: [PATCH 4.19 164/276] mmc_spi: add a status check for spi_sync_locked Date: Wed, 29 May 2019 20:05:22 -0700 Message-Id: <20190530030535.701092438@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 611025983b7976df0183390a63a2166411d177f1 ] In case spi_sync_locked fails, the fix reports the error and returns the error code upstream. Signed-off-by: Kangjie Lu Reviewed-by: Laurent Pinchart Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/mmc_spi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index 67f6bd24a9d0c..ea254d00541f1 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c @@ -819,6 +819,10 @@ mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t, } status = spi_sync_locked(spi, &host->m); + if (status < 0) { + dev_dbg(&spi->dev, "read error %d\n", status); + return status; + } if (host->dma_dev) { dma_sync_single_for_cpu(host->dma_dev, -- 2.20.1