Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9123734pxu; Mon, 28 Dec 2020 07:12:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhNS5aq7PmnZzrU01g+d8iHy0q1Sq7GFBZgKOY2Ase/c/K+Jf17l9G9cN0TPVefeMLKS8z X-Received: by 2002:a50:a6de:: with SMTP id f30mr43660450edc.30.1609168338745; Mon, 28 Dec 2020 07:12:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168338; cv=none; d=google.com; s=arc-20160816; b=ZzrMxOBQul5aMbAMZJLtjbvWJK3NB4CwV2dwsdVIG0wykdFCcCAPe77fNeV8YDknf6 772eX69xx7l4LrPAoBzO/7BLvT4u0p/0pVp3b18h6Wucf2xzRgLNoyUibqR4lXsIF/Qw eoWJLnEeCY3sj1ytwG+hdvYOEO2t8QAoeBWMrJ3EaPfops82A+7PDK+dpK0/ehmiqug5 Sek76V+aTpHj0TdHl2vEPejeinbyR8h7CSAFnynS3E2FkvMZJMHzjeMQ5qw3HxQTkTCn wGG96z5EeY5fjoap2QelxbNWsxbF+M8KwuQl/i9gvhslAhK0cs474bp55NWsluVi19xx JWFQ== 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=0flmpHiQ25CSmEH/CJGkCB/i8xSMrp8ri/JAlpZfyOs=; b=R0GWHp5ZeML3CT9JiFhYtAnis7K6V1I5wmm1n8I5aucTfhfJA8K+yOiB94F9YLZsYh YODNy6+pQRGStGPNhETjED6Rak4kLaQQ98ihITgxmBotOrmU1E8OXcJXPhyScofEK897 DVdH7NbzWW9HQUIKsQf3uD+yWO5KGj+kvYrZ/eRNyS2dhqf+0DTWtPFhHoGfb3s0rpMQ i39Ax3iYYSuFKBVaGPJkDuyP9iLhaxLfMYCYLRt6aPUrxkFDPDeTERgKozujzxRAWk0O O+DrKZtunLDOlVhdC7VOKPiikAuSaxdlBkmUoF290CPBRWs/f3RRFSMDdar6sHGhrtOA QGPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=orEu+3Kn; 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 s21si20639207edc.368.2020.12.28.07.11.54; Mon, 28 Dec 2020 07:12:18 -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=orEu+3Kn; 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 S2439691AbgL1PHd (ORCPT + 99 others); Mon, 28 Dec 2020 10:07:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:41714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391725AbgL1OId (ORCPT ); Mon, 28 Dec 2020 09:08:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C550220715; Mon, 28 Dec 2020 14:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164498; bh=LciEQlA0Wt/TM7z3ud8WIqK17lvwTRyS+orTdOpSgKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=orEu+3Knp80P5a74FpIcgzopDfaFdxAz8K7r7MOXdZ/XRBAnUBY4JfMHk49IFnRwn XkvddKS8GiRzvAmEQc30iCSFeMRjK15jdI+LdKc3OiVr3GzolBDBuYhPZJoWqtU4QY TOxB7BaIfglE9NLsVQHtECw3a3eHq53QB9X4bH5c= 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 5.10 201/717] dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe() Date: Mon, 28 Dec 2020 13:43:19 +0100 Message-Id: <20201228125030.607471591@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 2753a6b916f60..9b0d463f89bbd 100644 --- a/drivers/dma/mv_xor_v2.c +++ b/drivers/dma/mv_xor_v2.c @@ -771,8 +771,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