From patchwork Mon Jun 21 16:13:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 464540 Delivered-To: patch@linaro.org Received: by 2002:a17:906:71d0:0:0:0:0 with SMTP id i16csp4367903ejk; Mon, 21 Jun 2021 09:35:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEsQTmnoV+80QlXh35nSD2EQWjPSngn2r3v+RR6BQUrbedptamaV7iY1Tzdr5gMTXh9a8t X-Received: by 2002:a17:906:26ce:: with SMTP id u14mr25274794ejc.187.1624293327230; Mon, 21 Jun 2021 09:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293327; cv=none; d=google.com; s=arc-20160816; b=GOEuk1ZPam5d/+6PW3bzO2Todi2+Z+FYV1wOx4DEaDfM+pPiR6/sFAl7aikS0/5s5V s0EzxhMkaQYfe2DlKDVPcR0f90UIFeCDgZUImzEYkPWltowOCGzGUrIs/IgwaSNn0izS I11YDlhvBnH/Vu5M2r9pmpGyNxn49P3s2w+hUW09Ingbe87hG/2Xic79mhX5rULe+5vE zxQ1B+fatvkBqTydAufon+MGN28jQ4qmeFmfrnbKEu6SJUHS1CXzmt4a2uHtTxBHbGlC PlVMb9PaolzTKem3heRIxZI+5OUK60q8UuaCVHKdUyLsAS9kBECLcMRVyNvO6P8HrWYR yeSQ== 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=FssIcc2XNvTUBIZ9h7lA58hNOUrlcJUN12m5zWAUI4bAeoLGxl78+xgxDrvu814FZa PhChyO8yLQ3h2QR07DX3U9qIiZ4sQFo8ZfRrwIFxGgRCps5xY12xuTjj332vJfw09iq+ pQfOeGl9bPXF2ioVf+jMBYQXwR7vLzB0WRH5IKGvDQT56CIq0HcQi7dQfBqqAfbmgl77 lT0fJM2FLQEojt5NiakbpFfoHlzn6wIsmTWjXnls25jbU01l7OJN4fofUtEQKcbGXDVj R95bYLVp6gbPPOA2bx1cvzK09ndREQmbEIJQYX7iKcmGe1RXln9CqGT5fqgfU41pTc0M bprQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y4Lyto6Z; 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 co25si4079edb.289.2021.06.21.09.35.27; Mon, 21 Jun 2021 09:35:27 -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=Y4Lyto6Z; 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 S232786AbhFUQhh (ORCPT + 12 others); Mon, 21 Jun 2021 12:37:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:56050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233294AbhFUQfg (ORCPT ); Mon, 21 Jun 2021 12:35:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 40B57613BD; Mon, 21 Jun 2021 16:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292885; bh=ujPLZFC//0VPbPPGUBhUtMCiMXAskehCPx+qlF145z0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y4Lyto6Z0txy0hMn6mFKRAwELmPI9kbD3eMPklqfU8KLSi2xNgkowA+pYFg+SMzPR EsntTWqm62e8/UDmhOtIq5mcSGKdTE1xZoyO0jY/bS6zYy8WGIYzNA0OltDvtveCPx FNLSFejlO9nwIS9Pr6xK/HiWQNgeJBzCLHTiE1RI= 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.12 003/178] dmaengine: fsl-dpaa2-qdma: Fix error return code in two functions Date: Mon, 21 Jun 2021 18:13:37 +0200 Message-Id: <20210621154921.430584504@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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; }