From patchwork Mon Jun 21 16:13:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 464528 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2743853jao; Mon, 21 Jun 2021 09:23:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEAiwut2mRiuXqV/sOKFHJevTnayAAnlBQVE90OpsYalYZ0jImPRBd2aoROxNNQoUm92Dm X-Received: by 2002:a5d:9484:: with SMTP id v4mr21217343ioj.147.1624292610744; Mon, 21 Jun 2021 09:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292610; cv=none; d=google.com; s=arc-20160816; b=VIys+P+43kDRGSDC3EvSee1HekG5Vf0jm0Ie2TVrMMoiSnEVIi7JpawX9EIwGhlGOy TiK8d7A+8nmB5No/eG2jdUKLbUxHBzviOLWMaQD2Iq8mmHQUwWdPu6UK5vjPoaSP0KSY hLFaCp2yDB6jeYLnqZHMnWvuOm7+Qsm7CWxl+jhTBcaKGVhYZLSuJ/e1N2+C69FwdI9l 9amvxAFUykVMz83aB0zPz141RFKU5cHH0LR1aCK3Ghziq7EHocRkdgnUJ7bG3cBzKgx7 rtlJ/A1DhA7VJ91HYDAQLpkg7YirLWoPv0srkXT7PR8q87HgyX5OJu6/2RYLeHzBvN5f LyZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p+CROjGjXReCtJvif4CcEtAylV6GN9U4Xws7sZf8JtY=; b=Ulm7gjtBz2DKzbgDyIdalthpwP0F9ffvTHhr8AEb2OQKt2+b91I983XuivvFWIJpGy OcU0gfDiYHoUMvDFOkZL76v3B12HT1FgVfHDUvrmGpuKHxKdmSF3HwmhkJ3N1Kqo9GA1 pDGpvX407+KqaI6OKM+PcuBLL1XES8i31iom3/Fy0JE28NTr82kCPConx0XKjZltjhMX FreKjf0uqjZplLlo0X07OzrnkbgEz55AFXlafScJ/QwYnDB6rsYKuXbJYIACP5nDVPYA ApqkZQtLP8rA7gn1sV0enPzVXO2Dj8qTzt33chHZhDgj1ukgd6iDtz4r8up/B0qhKvoN 27Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uVn413eR; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si21202055jan.49.2021.06.21.09.23.30; Mon, 21 Jun 2021 09:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=uVn413eR; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232218AbhFUQZm (ORCPT + 12 others); Mon, 21 Jun 2021 12:25:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:42656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbhFUQYM (ORCPT ); Mon, 21 Jun 2021 12:24:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A6FF261370; Mon, 21 Jun 2021 16:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292464; bh=ujPLZFC//0VPbPPGUBhUtMCiMXAskehCPx+qlF145z0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uVn413eRiKnm0s62KOVPFk3wNKoNO2WRWoblQbbMozuox6U2wVzub/5609DZFMqBY WJqqEcepw1dDqA9B82s1hJWSkWEqdJLGVJSUR3wes26lPeenev7io6vOpMsQW2ksVu 7jlCpobJp8FXOtg5qigIYQkRxxni+KKxJeJh54+8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Vinod Koul , Sasha Levin Subject: [PATCH 5.10 002/146] dmaengine: fsl-dpaa2-qdma: Fix error return code in two functions Date: Mon, 21 Jun 2021 18:13:52 +0200 Message-Id: <20210621154911.329154653@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit 17866bc6b2ae1c3075c9fe7bcbeb8ea50eb4c3fc ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in the function where it is. Fixes: 7fdf9b05c73b ("dmaengine: fsl-dpaa2-qdma: Add NXP dpaa2 qDMA controller driver for Layerscape SoCs") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210508030056.2027-1-thunder.leizhen@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.30.2 diff --git a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c index 4ec909e0b810..4ae057922ef1 100644 --- a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c +++ b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c @@ -332,6 +332,7 @@ static int __cold dpaa2_qdma_setup(struct fsl_mc_device *ls_dev) } if (priv->dpdmai_attr.version.major > DPDMAI_VER_MAJOR) { + err = -EINVAL; dev_err(dev, "DPDMAI major version mismatch\n" "Found %u.%u, supported version is %u.%u\n", priv->dpdmai_attr.version.major, @@ -341,6 +342,7 @@ static int __cold dpaa2_qdma_setup(struct fsl_mc_device *ls_dev) } if (priv->dpdmai_attr.version.minor > DPDMAI_VER_MINOR) { + err = -EINVAL; dev_err(dev, "DPDMAI minor version mismatch\n" "Found %u.%u, supported version is %u.%u\n", priv->dpdmai_attr.version.major, @@ -475,6 +477,7 @@ static int __cold dpaa2_qdma_dpio_setup(struct dpaa2_qdma_priv *priv) ppriv->store = dpaa2_io_store_create(DPAA2_QDMA_STORE_SIZE, dev); if (!ppriv->store) { + err = -ENOMEM; dev_err(dev, "dpaa2_io_store_create() failed\n"); goto err_store; }