Received: by 10.223.185.116 with SMTP id b49csp1098122wrg; Fri, 23 Feb 2018 11:54:42 -0800 (PST) X-Google-Smtp-Source: AH8x225uixD2iVIqDCej378keYN+UtvVs21lB96ay0pixrSKRjpb/A3V62LSg6a/x1nyFZK4Tzwa X-Received: by 10.101.101.206 with SMTP id y14mr2198448pgv.297.1519415682793; Fri, 23 Feb 2018 11:54:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519415682; cv=none; d=google.com; s=arc-20160816; b=hl4Wnxpy10JwIGQByeGs4AmhHBOyRvaTqHnzjiKR5awSdyTaeGhjbhDBtqKkhTw2ce qzx5WGoUGgA+e+Zl1Pz9YkfO5P7+AkDItxoBS2DU76TzC03ZJzME7qiEI4TTNPHkfwhK yp+X/Dwb79Z478SsTDISLXsPt9Dc4JZJIpndnvEfndlM73VBk73sRXXpFcxPtwCyvL42 C9FrqeFjT34fApQZ0++AJWKNBA01UmVTMBXoKXzfNt64696zLetAUGBhHb1fAKR/TH1i 8se6sTJRricrxqCllQwgdyrK0g0fO6SlyYXem5P+S+z/Lkx+hGnOeS1Gg48hpU4j4AOm hD+Q== 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=JLXbvi7t6d5bgDj1FrYsdjC6S5Mj4y0E3JEcPjsPDAc=; b=aYcEgmNq59j9KwxiG6WLe15gkcxhFN6EUpm8yt3ZfbrSpCu7YsovREhGI97DikmBi+ 7CvjlrFFyDW0MRSbFSinBsM49ynarHd+M1cztqXOYFKhtfNzb6BEG0kHYBo88CsF60/3 ZfhM6VlM49mmL1hpPP0jmCTaSQalpcbtcqMp6FSdJWrpZhAixUExmdipdfU2UIIxXMRm T8dEn8n/l2Jjb+qAVmuNVjnmeXIo4aV1zW+SJTH0PLJG3FyVpgiIT5N1O7Ae74AgIghB mZpQumxH/4Ai2xbLL6wjlIFihLGv+oROKcMeD42qzJnlQ53JfqJEIY8llrV06UD8HcnC J1IQ== 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 e4-v6si2218268pln.655.2018.02.23.11.54.28; Fri, 23 Feb 2018 11:54:42 -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 S1754978AbeBWTx0 (ORCPT + 99 others); Fri, 23 Feb 2018 14:53:26 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43320 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933796AbeBWSp1 (ORCPT ); Fri, 23 Feb 2018 13:45:27 -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 A0C3C128A; Fri, 23 Feb 2018 18:45:26 +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.9 072/145] dmaengine: ioat: Fix error handling path Date: Fri, 23 Feb 2018 19:26:18 +0100 Message-Id: <20180223170734.005131583@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@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.9-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 @@ -388,7 +388,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: