Received: by 10.223.185.116 with SMTP id b49csp1138723wrg; Fri, 23 Feb 2018 12:37:11 -0800 (PST) X-Google-Smtp-Source: AH8x225mQv1k9TTToPm9H+DNb7G02orPHbYvYknUK/GQgFykBxn3Un0sDbCWFkMnTBQjrh3OEwiy X-Received: by 10.99.163.111 with SMTP id v47mr2345891pgn.80.1519418231357; Fri, 23 Feb 2018 12:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418231; cv=none; d=google.com; s=arc-20160816; b=VmHqAMtrYUYb+MFW4SSqYALentkQhzt86i4hjzVwsXUnRlTkj2SmEZu/jDhmwPkxJo EvvysVlQMA7pCaxevJUXwkJBI8fbTshk7zAtrzLic7z3GFK456oNzKbrjw851B1iQA7W Y+F+hF4qy7MckIaciz2mCPeSSNFMgMmNdEtHPP47WLoRY/8MTt1NwfDSQCY4OzsZc6Uj rDStOX/8eHyA+mqu2T0hQ1ls2+aVG5PBb3bvZnwLKOD3CWuvE4yZN1932tyX5N2pXn4p h3wjpciwUtUzpVOSZqABJTOF08LHPYE4pdnoHgPKr+wUb2Lff90pk8ei7d2d7ci5hui2 j+YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yONmBN0PwLawH/44puTRPwySCtZZ9oWD6LkdbP8s8iA=; b=KIxrKKsbaoaWm/OSh4MZ4Bcqqow9OF/lCjhAjnAxuFkbCKKnlTq9idkLFkIx77TOAd dVe7G1CXV14yLOo4OIx5s1tkTeG+D1Nx9joBjXagoEccUEZRqYQdz5auzrJNmtx8jrVe /ymUh8fPZG6uCauc/hWzzPdrGfbEFtnQJT3QvC53DcN3eRsm7plHkIu7oYrCM3z0Qxoa yUie5zGzovSjtMEIlbjDESOfgIER1f2jQz9tZAlFgOcgooDJqhM0J4hj9feX3qkjwxFT yKEFKp65HhLdYTEvGYnUfiA5NR3ezIFFEaHFJPyFwPkXvTrllsF2DoS5kd1YLXKwzDcK aGtQ== 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 b3si1908011pgc.496.2018.02.23.12.36.57; Fri, 23 Feb 2018 12:37:11 -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 S1753674AbeBWSez (ORCPT + 99 others); Fri, 23 Feb 2018 13:34:55 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37078 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbeBWSev (ORCPT ); Fri, 23 Feb 2018 13:34:51 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B71D11241; Fri, 23 Feb 2018 18:34:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Dave Jiang , Vinod Koul , Sasha Levin Subject: [PATCH 4.4 050/193] dmaengine: ioat: Fix error handling path Date: Fri, 23 Feb 2018 19:24:43 +0100 Message-Id: <20180223170333.848670432@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ Upstream commit 5c9afbda911ce20b3f2181d1e440a0222e1027dd ] If the last test in 'ioat_dma_self_test()' fails, we must release all the allocated resources and not just part of them. Signed-off-by: Christophe JAILLET Acked-by: Dave Jiang Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/dma/ioat/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/dma/ioat/init.c +++ b/drivers/dma/ioat/init.c @@ -395,7 +395,7 @@ static int ioat_dma_self_test(struct ioa if (memcmp(src, dest, IOAT_TEST_SIZE)) { dev_err(dev, "Self-test copy failed compare, disabling\n"); err = -ENODEV; - goto free_resources; + goto unmap_dma; } unmap_dma: