From patchwork Thu Oct 9 18:44:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 38528 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E08AC202E7 for ; Thu, 9 Oct 2014 18:44:21 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id b13sf1217100wgh.8 for ; Thu, 09 Oct 2014 11:44:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=YdGvrEqNiqkxypOoif2VkemrWqTOwNO8PEO0OrO5bm8=; b=iEI3MYDoOzvSYoeNGRBTlAPo7qYcym9m38BMMvfcP+qcWkUnw4PUDPJ6YpC1FZGXf8 M3XTzkBfkkeJ1fsouf0FTnbBF2g+cBARx1O3DvdfsXhXL/NLjKURITmfrcAFacibQKMZ P+1rdssPqVyNRdsGR248uUE+peCl82ZCwALLw8w6T/wfjQqoIJf06AuoUenZOAWRzVeG ikxCQoK3BtoQrGsA7xeRyPcEiLmZ6DpA8Pf+ptMc4AwAvGcB6asR3j0RSdOsQlsi1LAe qiJ2C4rwnw1n2OY+dSwE+1bbKzUgwuxgk8xt/wlDsdtCrkF9Nb+OWMReEfp9+ADnfaqA E6qA== X-Gm-Message-State: ALoCoQnvwZ1bKBy6ooWq5on3tFQNhwEiCwyM5P5qE22ANhUVeGu6faqlB6OOfXfw9SD+GF8JJ5iJ X-Received: by 10.180.221.236 with SMTP id qh12mr12657wic.4.1412880260922; Thu, 09 Oct 2014 11:44:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.40 with SMTP id 8ls193064laj.65.gmail; Thu, 09 Oct 2014 11:44:20 -0700 (PDT) X-Received: by 10.152.5.40 with SMTP id p8mr20835848lap.32.1412880260762; Thu, 09 Oct 2014 11:44:20 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by mx.google.com with ESMTPS id t1si5689950lbo.69.2014.10.09.11.44.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Oct 2014 11:44:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id l4so1693753lbv.24 for ; Thu, 09 Oct 2014 11:44:20 -0700 (PDT) X-Received: by 10.112.134.229 with SMTP id pn5mr19542544lbb.22.1412880260503; Thu, 09 Oct 2014 11:44:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp299924lbz; Thu, 9 Oct 2014 11:44:19 -0700 (PDT) X-Received: by 10.70.37.232 with SMTP id b8mr85196pdk.0.1412880258862; Thu, 09 Oct 2014 11:44:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si1393497pat.229.2014.10.09.11.44.18 for ; Thu, 09 Oct 2014 11:44:18 -0700 (PDT) Received-SPF: none (google.com: linux-spi-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751060AbaJISoS (ORCPT + 2 others); Thu, 9 Oct 2014 14:44:18 -0400 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]:25026 "EHLO mail-gw1-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbaJISoR (ORCPT ); Thu, 9 Oct 2014 14:44:17 -0400 X-IronPort-AV: E=Sophos;i="5.04,686,1406617200"; d="scan'208";a="48075745" Received: from irvexchcas07.broadcom.com (HELO IRVEXCHCAS07.corp.ad.broadcom.com) ([10.9.208.55]) by mail-gw1-out.broadcom.com with ESMTP; 09 Oct 2014 13:00:37 -0700 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 9 Oct 2014 11:44:24 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.174.1; Thu, 9 Oct 2014 11:44:26 -0700 Received: from mail.broadcom.com (lbrmn-lnxub44.ric.broadcom.com [10.136.8.49]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 37C4D40FE5; Thu, 9 Oct 2014 11:44:08 -0700 (PDT) From: Ray Jui To: Mark Brown CC: , , Ray Jui Subject: [PATCH] spi: pl022: Fix incorrect dma_unmap_sg Date: Thu, 9 Oct 2014 11:44:54 -0700 Message-ID: <1412880294-9860-1-git-send-email-rjui@broadcom.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rjui@broadcom.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When mapped RX DMA entries are unmapped in an error condition when DMA is firstly configured in the driver, the number of TX DMA entries was passed in, which is incorrect Signed-off-by: Ray Jui --- drivers/spi/spi-pl022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index f35f723..fc2dd84 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -1106,7 +1106,7 @@ err_rxdesc: pl022->sgt_tx.nents, DMA_TO_DEVICE); err_tx_sgmap: dma_unmap_sg(rxchan->device->dev, pl022->sgt_rx.sgl, - pl022->sgt_tx.nents, DMA_FROM_DEVICE); + pl022->sgt_rx.nents, DMA_FROM_DEVICE); err_rx_sgmap: sg_free_table(&pl022->sgt_tx); err_alloc_tx_sg: