Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp656541pxm; Wed, 2 Mar 2022 06:04:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyehBoQDAJ3R3ZMrR7obi/YGEcDDYooCKMAwTfTLBU5XRD3kRDSBR/ZnAjCKefnjUKNdmZq X-Received: by 2002:a17:906:a2d2:b0:6d6:e5c5:9ca1 with SMTP id by18-20020a170906a2d200b006d6e5c59ca1mr6126400ejb.33.1646229889431; Wed, 02 Mar 2022 06:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646229889; cv=none; d=google.com; s=arc-20160816; b=oaeERWL6KDew0vtUDPmycUkpkf0Djr+PX21fR6tw1xcLoh5++i00MQDm4O6avzy8pr tM8mmpNAqOfZMJa0tdhj2p7v28NXmF9xpFG3d1dUtIlb39iSmLe9DL7JUrOOJDtG/Ktw 08fsZO72so+Bb2trag/FTlZBr2TFpwdBv6B/HbWB5j0y9nyJ2PzcHZDlUo1ti8ZtHGks DZAcj5AHMo0ubxG9Hxdxcri2LXkywIKOYbJs4WLW/bl81PCJkrPa1pgNdc9fqwisalHV iTRdIBbzNXVtOzhYkApWI5MQ5y+dAU8rYhFNfdd7eLWwS9R05wodDZodpDLwdRHFpa/4 J4/w== 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 :message-id:date:subject:cc:to:from; bh=4VjDtxIWO4VkK5EuJpMMgEcTs6OGz/ouH3wijI0/Gkk=; b=Wp8NvS0qCOfBCb2ERgB2w3hAM1tPI63S8k+PcldiNBEj04Gaa/F1q5CZdvLtW6kqoJ jFt77kZWmmRs3MzY4QfRBSswk8xZDMojUDhSsm2p7EokrytPWborzpznH2ktValmFGJA ffnqvzQOzY70vxIUfx9gmPRGDJIFS6/2QQtBs2pvkRIcbvrERglUbb5X6mP11DRM5diG Ftek0ZJBotNs535ZjIuH1q5E04ZshFVrc0Gr6kraVgvBPkGMdMRtWYIYd8oy0X8BZoMr FiGoWvaNJF8iEFwNc93hIWNBN5ebXcnMXjaJEruicYGvEEPmJoTj2LogzH12T7ZSfJeS 318A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd42-20020a17090796aa00b006da7d6edbcfsi447011ejc.475.2022.03.02.06.04.25; Wed, 02 Mar 2022 06:04:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240838AbiCBJ62 (ORCPT + 99 others); Wed, 2 Mar 2022 04:58:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240836AbiCBJ6V (ORCPT ); Wed, 2 Mar 2022 04:58:21 -0500 Received: from cstnet.cn (smtp84.cstnet.cn [159.226.251.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DF31E13DD0 for ; Wed, 2 Mar 2022 01:57:27 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-05 (Coremail) with SMTP id zQCowABnSfKGPx9iVqntAQ--.27856S2; Wed, 02 Mar 2022 17:57:26 +0800 (CST) From: Jiasheng Jiang To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] drm/xlnx: Handle error for dma_set_mask Date: Wed, 2 Mar 2022 17:57:24 +0800 Message-Id: <20220302095724.170542-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: zQCowABnSfKGPx9iVqntAQ--.27856S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtr45GF45CFy7JFW8Jr13urg_yoWDJFbEvF WUZFWkXF1qyr1vqr42krnIyr9YyFn0qrsxWF18Ka4fXrW5Jr93Xa1UZF1kGr4UZ34UCr4U Ar4q93yfJF4xGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbcAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r106r15McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVAFwVW8uwCF 04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r 18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vI r41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr 1lIxAIcVCF04k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF 0xvEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJbIYCTnIWIevJa73UjIFyTuYvjfU8iSdDUUUU X-Originating-IP: [124.16.138.126] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the potential failure of the dma_set_mask(), it should be better to check it and return error if fails. Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem") Signed-off-by: Jiasheng Jiang --- drivers/dma/mmp_tdma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index a262e0eb4cc9..e6cf3d174238 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -722,7 +722,10 @@ static int mmp_tdma_probe(struct platform_device *pdev) tdev->device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; tdev->device.descriptor_reuse = true; - dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); + ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); + if (ret) + return ret; + platform_set_drvdata(pdev, tdev); ret = dmaenginem_async_device_register(&tdev->device); -- 2.25.1