Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3922163pxj; Mon, 21 Jun 2021 09:26:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpI6vMSgWrHqyE7HuzM9hWPnWXmGoqFn9PWMs1XR9pbTkGQy8aMZeCcGhmKPI2/vfDVMI/ X-Received: by 2002:a05:6402:1c04:: with SMTP id ck4mr7026822edb.301.1624292761472; Mon, 21 Jun 2021 09:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292761; cv=none; d=google.com; s=arc-20160816; b=AUCaDRA1h1qL8ZDBsGkS1SguPf5r+l7Hr2dVV3pV8JsjbalbZou/PR8Rf+BNBt35JH rkyIlYVsyrMIzT8mDU5s/eDX+yHwjw4qk2jQvfF+UJDXNe995ij2F8LjhIdJHrhwDc4x aeCIlDW5bCZQJOtZbCFebCqv2Ni89im/tG055wG55/t5rFqcXGvDAxTTuI4qtH+LbCPN soWZ9qnWcGoPehZJYOIXyk4QStWyxogMd0wF7+mP7L/p+3Z0XsKjQqoqo9MwUBY/aS9v FQ/EJG2Ck7uLFVyKpn/owRzpNkdS5C+T5iVKKsvyyqWu95kLqpyjxp7lxaWOrJI4othY 5kAg== 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=cOMObMd/qBf6JjVN7lKj+C3NNhCXHjh5SY2uHCcWtMphL2VFK5BJbekF/R8y0m43bX //hxclJTD/kCJxLanvzf+GzlS3QHfXrUQEVTnz6tHKRr4dO8iaBTyY9PmsOlF3q01O1W LUfSE6zhFXb6ps6FG8ySdrJM5zkC8qhb412eTEDeXE6NDQgsgDk/saaNR4M9cbA/vO1r Y8WeoKEuEFtq4DYlNoqfCcZlfbMrC2VFRu4DvpzFw21UMnGoU8+rdCxOBnHESECLmAr6 lQskkLUHEVeYOstLCB6XZxIgb1sZp8h1Ln77P3vgAHq66CmLUsu9/TD79r3yOjy6moAA qFrw== 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 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si10806751eju.32.2021.06.21.09.25.39; Mon, 21 Jun 2021 09:26:01 -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=@linuxfoundation.org header.s=korg header.b=uVn413eR; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbhFUQZv (ORCPT + 99 others); Mon, 21 Jun 2021 12:25:51 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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; } -- 2.30.2