Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp26072pxb; Fri, 15 Jan 2021 05:02:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbwN6uOsf8eSpjI6oAlVVA56Whph7A1KvgNrPWGCBkfEu6I3VlK/j72SRGTqCSD4RwBVF2 X-Received: by 2002:a17:906:958e:: with SMTP id r14mr8966861ejx.319.1610715752826; Fri, 15 Jan 2021 05:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610715752; cv=none; d=google.com; s=arc-20160816; b=I7JCoeufLeCYClrH7DM9WBMsIExcJZJ+L0LKwi6Ut5FYiZAFUVyAlqudNSC+qTBQKc SuU/JQk3xKpVZHcGx2S6pftLFvW+7+zbXL5c7s1gKVFLtrOVvEaULbKZHB1roH5yIxem l1V/P7jRHf0Iv85Cy/gy2shGyRAupd/8/2WTcm1EBXWZWqjsNBwC6v3ngFAKbLFZQgo9 lp0gVeQ6CqSxofcYjokZ/HMx/h2FvacwDekyPozfzfH70G0b/B1dQWdvvtX/hOFnh7MI RdoglRUYOJwvOcOgMGCSRcE9KlTYPs2TYfd/EqrQkeL9bzBko4Lztcq/1xINYaJo+su3 45sA== 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=WNAeujJs5KNT4a1jaX/mCA16T/unrq+Y4rgiyqGQ5es=; b=eXfr5YkEzBr3Xr58JTrEi6+ukNbg3Nkar20IyXU05ikho+UjmJBqKs4k4bFRZDEqvE Dcq1zzagVHVZQz+5hyuHfI7BCbNNHprH0o4sufGVUjlgyWyZ0ERXSBK0HvoyLBXEEVUi V3TfoKBuEYnzGopRFh2Cl4TaQbMP3e5tfUaTKHlZo4RQbjfo2gY+66hxTT36n8owz7rl kZHD0VADK5xpsLkc7YkZynT/ERTwSGJu5Yr18BOpB4Zlx1mFaY7HviZ7qnCC0xAMKmOs LeYxPdy/b2JDzzpNDq4CJbVGkzM5NRSxV7f3StzsxxdQ1+ol8sI/hq3Q3IjZ8EOEpI6C Lj4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BSOeeDcJ; 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 c10si3860057ejf.281.2021.01.15.05.02.08; Fri, 15 Jan 2021 05:02:32 -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=BSOeeDcJ; 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 S1733214AbhAOMdi (ORCPT + 99 others); Fri, 15 Jan 2021 07:33:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:39960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733154AbhAOMdh (ORCPT ); Fri, 15 Jan 2021 07:33:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 962DC235F8; Fri, 15 Jan 2021 12:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714002; bh=TDDpXuBgLVCiAQrY2XBfhsvvI8CTbty4gxeGpYh89g8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BSOeeDcJkX+BFZb3fmsDKNlFzJiq9T/8CTPqwU1SiIEUaogL3b/Hjq6nWAEin2U+C CGGh22iNFBMGMYHjZ1eYcpk33d2G5Bqv6T2Um9y6uccdCA4ZxUvDJCDenia6yGV8+s 0d9b5gUms6FFJIkuGkfC807lv0htZvZPEyDlu+ns= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shravya Kumbham , Radhey Shyam Pandey , Vinod Koul Subject: [PATCH 4.19 29/43] dmaengine: xilinx_dma: check dma_async_device_register return value Date: Fri, 15 Jan 2021 13:27:59 +0100 Message-Id: <20210115121958.458407619@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121957.037407908@linuxfoundation.org> References: <20210115121957.037407908@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: Shravya Kumbham commit 99974aedbd73523969afb09f33c6e3047cd0ddae upstream. dma_async_device_register() can return non-zero error code. Add condition to check the return value of dma_async_device_register function and handle the error path. Addresses-Coverity: Event check_return. Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support") Signed-off-by: Shravya Kumbham Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1608722462-29519-2-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/xilinx/xilinx_dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -2713,7 +2713,11 @@ static int xilinx_dma_probe(struct platf } /* Register the DMA engine with the core */ - dma_async_device_register(&xdev->common); + err = dma_async_device_register(&xdev->common); + if (err) { + dev_err(xdev->dev, "failed to register the dma device\n"); + goto error; + } err = of_dma_controller_register(node, of_dma_xilinx_xlate, xdev);