Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9444221pxu; Mon, 28 Dec 2020 16:47:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoGGqDiEjSjaayPgipB82Sgp4/nTCzyCeTe4cYvYeTVE7uG7oRX052H8zqxLZ2jUg2BdVC X-Received: by 2002:a05:6402:1d3b:: with SMTP id dh27mr44984371edb.238.1609202830861; Mon, 28 Dec 2020 16:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609202830; cv=none; d=google.com; s=arc-20160816; b=nz4tw2GhasbOy92AUr+flZBK3ItSMYtmzXJ24MlkYA8EgdDvxDsNi+Wg5w/ZDws3MA uQLWtz/AIw71ENkfh1U2eUagEGJhEXVIpTsCbepOS/E6lK+bxewccIhTTgW8QaxQfsnh kVfrky6RudrxuOaXLtJb5NNmblT1LT7Fy7B2mArtm81gNsbL0PY7TlsSEE2ajDDAIkL4 aXYhr2m7XzkT9HRH0H6XHmp095m3ZmE8BoQn1sEx6Ovd2P1xyLYc/36eWbndeR4ZV0Hc xe0VxrEfwk9PZDz0iuv//4M0yOflpcx7ks/wahY8NyBH34abqjWHvYPGaljB/bG0AyMw pgsw== 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=PIW7skrQNvOlBCv0sGJHSvXPz0MZyhaHNqyZg/57f2w=; b=V5EEwS8qeLi6qrGGNOgDrnREB5m5Hs+pBGWWGury7dgsx5qI6GY415k/GgIhGPRDYt LkD/Bwae6uTx5m0+d7A2LaieoG0UeWYtuZtuCZYCWwQNUUnQJE4Siy4cYiwhRR+5eGGN hIVDXIi7V3ZQJRHht7RKS8fmq2ZMd4u/aoTzqkkZD3ob3qROqZSinPRLa/GpawYBrx8C n2I9Cr7dHzbgQJ1DxhGkz2TmEl8jVQVRds7cbdoDF4NmsqtRF9N2ZeYSJzgQ94U0Sp9V 4xw3Y3wJC77XmZjHOVQYly4d9GHGU/JnXLVk3O6XoVwYlsQoOv6mTOZjiAEk9Ky7DZNR ZFTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xKDq47EG; 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 bx8si19932087ejb.664.2020.12.28.16.46.48; Mon, 28 Dec 2020 16:47:10 -0800 (PST) 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=xKDq47EG; 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 S2388033AbgL1QEo (ORCPT + 99 others); Mon, 28 Dec 2020 11:04:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:56682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389761AbgL1N1y (ORCPT ); Mon, 28 Dec 2020 08:27:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E0DC422472; Mon, 28 Dec 2020 13:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162033; bh=BTAvjbVVQsa+KD4dezYI2fL5E+Y5760p7NFkr+BtQTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xKDq47EG1igusZ3meSUb57069QMAWeK3Bh3+rJvMKGbTEqVOp04PcImc80TzFmBoY xm5HIlQR3DhoLOapcJv8PHBKqWmLN5YLVECPhYMW25BjNRrVdDsLwrp34pVitDRA+9 TZnItLfyAQX4Y/XNzrENN5H4c/Meysu349fOZtUE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhihao Cheng , Vinod Koul , Sasha Levin Subject: [PATCH 4.19 166/346] dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe() Date: Mon, 28 Dec 2020 13:48:05 +0100 Message-Id: <20201228124927.815361274@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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: Zhihao Cheng [ Upstream commit c95e6515a8c065862361f7e0e452978ade7f94ec ] Return the corresponding error code when first_msi_entry() returns NULL in mv_xor_v2_probe(). Fixes: 19a340b1a820430 ("dmaengine: mv_xor_v2: new driver") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20201124010813.1939095-1-chengzhihao1@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/mv_xor_v2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c index 8dc0aa4d73ab8..462adf7e4e952 100644 --- a/drivers/dma/mv_xor_v2.c +++ b/drivers/dma/mv_xor_v2.c @@ -777,8 +777,10 @@ static int mv_xor_v2_probe(struct platform_device *pdev) goto disable_clk; msi_desc = first_msi_entry(&pdev->dev); - if (!msi_desc) + if (!msi_desc) { + ret = -ENODEV; goto free_msi_irqs; + } xor_dev->msi_desc = msi_desc; ret = devm_request_irq(&pdev->dev, msi_desc->irq, -- 2.27.0