Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp787999ybj; Thu, 7 May 2020 07:39:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJLI+hCuMB5qzBzFJhZAjyoGwGV539Vy/GiYLfMvrwpATTW3i2cEY/Cu0TphcS9T8OZPoOS X-Received: by 2002:a05:6402:1215:: with SMTP id c21mr12641726edw.128.1588862392278; Thu, 07 May 2020 07:39:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588862392; cv=none; d=google.com; s=arc-20160816; b=vTBTYux3A6O7l1tDeHJQYpwVsc53zxHRf0R9Tw7+dBaWGLZ3K20wh0b5+9vI9l9Jmf 7YtT5e5Z13lqS7vfLF9OZYXU44c+3vnP2sb+apl/qAGHlYciLk4hNw4hZlDPuM3iAMP3 eyTb2nhTvFk5vaiki6EK+gq/U9onl9contKuXWnUndDXQY7CrYTSVLdpgH0lEK8I0eZj Xhhx5iv2dvb/XXJv3UPsWi9nL7OGZFVcMeRoZQzd0T4z5FFX0i4IRqHxlSueBG1K0QJx RFHVgYrEaQOANQR+GAa5I0Ok9h6Olbq1E83/TN54jLPwmSeHvCfj3MPDLdv4Ewj2ZmAZ g95g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E98eHAYaX141sUEgdCgcugEiQeQ3mEHuVVaOsJIC0mY=; b=Z9R43CCqtLpM1Tm1XfzWm0yxbAloeWhGtXLwCDyItEDppyd7nOEt1fOv9onSWNM5z/ sdRb5mW3FipF4LnJF13+wiIyALtP/Jk5KJtAfNch04VVZZJgMcnaNpqvR/tKg9xElV02 a/O7et+C+usmto36+cywTbCFAQ9NAGNFHZZE1hrv6ZWKS1T4yoywAoHiu4/m4K+MOAY0 5fqUkx+2jaD2RD6KHV2O9BFRgr6e6BhwvfpjchXk6cNipabhXOjVM5KIXhoAG4lVmp1n pBIjU1r+6jl/EcZPqEmNNhZa9Sn1mZXcuqhZ6kOb2bDYJFbOA4xu6nWTV+NQOBSYiwM+ IesQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lipTYIHW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k26si3189146ejs.504.2020.05.07.07.39.28; Thu, 07 May 2020 07:39:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lipTYIHW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728600AbgEGOiD (ORCPT + 99 others); Thu, 7 May 2020 10:38:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:53736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbgEGO1s (ORCPT ); Thu, 7 May 2020 10:27:48 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7761920936; Thu, 7 May 2020 14:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861668; bh=CiUqSGGZ/wftLj2uPpD1velB9FbEfAK86NJmC+dCe74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lipTYIHWbG5X2Zqg8Kk5Z7y/uerSBYPnV5n6Hik38MKzkei3oBaGmjH3jKOjhUwXg eba2+7vBXJNKpmbeHy0rU+/1Ky3KYCxdMWCCzKH0/KlyVQLTYLYIbDv+qkZ0n9YGVK XU0tVSAMP/6/o5bt7xk6Tk8+0ZuxOpK8OG4Av66k= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lubomir Rintel , Vinod Koul , Sasha Levin , dmaengine@vger.kernel.org Subject: [PATCH AUTOSEL 5.6 17/50] dmaengine: mmp_tdma: Do not ignore slave config validation errors Date: Thu, 7 May 2020 10:26:53 -0400 Message-Id: <20200507142726.25751-17-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lubomir Rintel [ Upstream commit 363c32701c7fdc8265a84b21a6a4f45d1202b9ca ] With an invalid dma_slave_config set previously, mmp_tdma_prep_dma_cyclic() would detect an error whilst configuring the channel, but proceed happily on: [ 120.756530] mmp-tdma d42a0800.adma: mmp_tdma: unknown burst size. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200419164912.670973-2-lkundrak@v3.sk Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/mmp_tdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 10117f271b12b..51e08c16756ae 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -443,7 +443,8 @@ static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic( if (!desc) goto err_out; - mmp_tdma_config_write(chan, direction, &tdmac->slave_config); + if (mmp_tdma_config_write(chan, direction, &tdmac->slave_config)) + goto err_out; while (buf < buf_len) { desc = &tdmac->desc_arr[i]; -- 2.20.1