From patchwork Fri Nov 14 12:25:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 40819 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9EE6E240ED for ; Fri, 14 Nov 2014 12:35:09 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf9117521lbg.9 for ; Fri, 14 Nov 2014 04:35:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=wtbjijZ1mxa8haMTS+LAjrIFaSWuN3PTd06fmtffrRw=; b=AChq8wZ50eZLCGEJkq1rUeVnMXKSBtZRkKAJsewcO+PXazqOj93Np9t7uxMB4o/S3e e1ufZfo0nzpnRcq4JqEF1knQ7ZK/PdHbMOnyy9LiGVInlcJih7t1NzeSIPFMCRGVPIzd AYk+GXDqPmg9wKCP3MpQ9mKqPwe5dX00pMHVeqyW6HaE5q+jfdMpCNT9NS/llmkldyEY PXgO5e+5KMLqOUIKRNJsYatebouxb9NVgQPKKz7cI1wVXtBxHaqaB9BXug0yVZgHd74w 1aXCK4Z6P57DaINH89hQu1M0ohPFlIETaE/Z6uFm2p8MxReX2rqQIat7yFkkr5hYtHWJ TGhw== X-Gm-Message-State: ALoCoQnoSfWJmJsTndIr+Drmh05MCTIXn5mw8ojZrpZIwZ8+1i6KJRYy/KjjxNLHGocxpmdom6BT X-Received: by 10.112.166.102 with SMTP id zf6mr446489lbb.12.1415968508706; Fri, 14 Nov 2014 04:35:08 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.108 with SMTP id lf12ls760184lac.48.gmail; Fri, 14 Nov 2014 04:35:08 -0800 (PST) X-Received: by 10.152.36.74 with SMTP id o10mr1396277laj.96.1415968508453; Fri, 14 Nov 2014 04:35:08 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id u2si41507129lal.70.2014.11.14.04.35.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 04:35:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id gd6so14595369lab.20 for ; Fri, 14 Nov 2014 04:35:08 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr7956015lbc.66.1415968508380; Fri, 14 Nov 2014 04:35:08 -0800 (PST) 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.184.201 with SMTP id ew9csp756076lbc; Fri, 14 Nov 2014 04:35:07 -0800 (PST) X-Received: by 10.66.146.135 with SMTP id tc7mr1347424pab.155.1415968099063; Fri, 14 Nov 2014 04:28:19 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tf10si28257803pab.175.2014.11.14.04.28.18 for ; Fri, 14 Nov 2014 04:28:19 -0800 (PST) Received-SPF: none (google.com: stable-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 S965364AbaKNM2D (ORCPT + 1 other); Fri, 14 Nov 2014 07:28:03 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59472 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935347AbaKNM1R (ORCPT ); Fri, 14 Nov 2014 07:27:17 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3770A75043; Fri, 14 Nov 2014 12:26:56 +0000 (UTC) Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1XpFxe-0002aN-KM; Fri, 14 Nov 2014 13:26:46 +0100 From: Jiri Slaby To: stable@vger.kernel.org Cc: Ray Jui , Mark Brown , Jiri Slaby Subject: [patch added to the 3.12 stable tree] spi: pl022: Fix incorrect dma_unmap_sg Date: Fri, 14 Nov 2014 13:25:56 +0100 Message-Id: <1415968006-9521-56-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1415968006-9521-1-git-send-email-jslaby@suse.cz> References: <1415968006-9521-1-git-send-email-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 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: , From: Ray Jui This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== commit 3ffa6158f002e096d28ede71be4e0ee8ab20baa2 upstream. 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 Signed-off-by: Mark Brown Signed-off-by: Jiri Slaby --- 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 9c511a954d21..b1a9ba893fab 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -1075,7 +1075,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: