From patchwork Tue Nov 18 14:08:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 41036 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A1EF24035 for ; Tue, 18 Nov 2014 14:19:35 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id r20sf2309078wiv.9 for ; Tue, 18 Nov 2014 06:19:34 -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: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=RVjNH6ZlhmI9Zxz0YXD4sxGfp7pRHl9G31D0LFXxleY=; b=Xr+EOeWlcDZh9NsIS/Mp/IqUcORNchkcQwr/MPmI6Yycqba0aSPuSeSNP/IwIlSGhj MT6ymd1tiZxUvbIa2HnywCeka2u2wzRj5VRA7XNZylCjTWIa0cMk+VBfQNGZPhhlk9uR skS4K5BTRHHU99d5vbYR6lxSHpQ5xchD2MCB4GnwprmF8ew07TutYFeDDGVRxJck1PwM J+a4Wc8jTwLL5/Ri+gsKZ96ZZCeOiOX0OIlFerqTiP910v6U0UJn8QMzyH7MvrwluEqF qpp4/KIVn+NEK02LG/QftYV3Y8hkJl3wfsTnAFY24sltyypeWFMieLnOkn80u6TF8tql 4Xag== X-Gm-Message-State: ALoCoQnoym/SatKz49NABD0w2n4C3bhCWXxOdf4E3WPLPgCFJnGMBwYO7sVUG5n/6Gz6RnqqXD9W X-Received: by 10.180.82.34 with SMTP id f2mr4761622wiy.1.1416320373715; Tue, 18 Nov 2014 06:19:33 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.202 with SMTP id u10ls50266lau.68.gmail; Tue, 18 Nov 2014 06:19:33 -0800 (PST) X-Received: by 10.152.21.199 with SMTP id x7mr36363234lae.66.1416320373557; Tue, 18 Nov 2014 06:19:33 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id oz1si49890340lbb.88.2014.11.18.06.19.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Nov 2014 06:19:33 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gm9so3535216lab.32 for ; Tue, 18 Nov 2014 06:19:33 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr36244393lbo.32.1416320373394; Tue, 18 Nov 2014 06:19:33 -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 ew9csp1335693lbc; Tue, 18 Nov 2014 06:19:32 -0800 (PST) X-Received: by 10.66.234.72 with SMTP id uc8mr37209837pac.51.1416320371384; Tue, 18 Nov 2014 06:19:31 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bq1si15871078pdb.72.2014.11.18.06.19.30 for ; Tue, 18 Nov 2014 06:19:31 -0800 (PST) Received-SPF: none (google.com: linux-kernel-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 S1755794AbaKROTQ (ORCPT + 26 others); Tue, 18 Nov 2014 09:19:16 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57040 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932244AbaKROK0 (ORCPT ); Tue, 18 Nov 2014 09:10:26 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 78D53AE59; Tue, 18 Nov 2014 14:09:25 +0000 (UTC) Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1XqjTA-00024F-Gp; Tue, 18 Nov 2014 15:09:24 +0100 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ray Jui , Mark Brown , Jiri Slaby Subject: [PATCH 3.12 155/206] spi: pl022: Fix incorrect dma_unmap_sg Date: Tue, 18 Nov 2014 15:08:30 +0100 Message-Id: X-Mailer: git-send-email 2.1.3 In-Reply-To: <28f04bcc068a44c5641c727883947960fb8dcbd5.1416319692.git.jslaby@suse.cz> References: <28f04bcc068a44c5641c727883947960fb8dcbd5.1416319692.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.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.45 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 3.12-stable review patch. If anyone has any objections, please let me 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: