Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp36940pxm; Wed, 2 Mar 2022 09:58:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJynSG57X6WmU1BZOBITfeKHlAr9BfN5ESMQKEx+mGRYV957TyU9OweVkcC+vy82tUaPJG5s X-Received: by 2002:a17:907:971f:b0:6da:8145:5b1e with SMTP id jg31-20020a170907971f00b006da81455b1emr1607901ejc.522.1646243919147; Wed, 02 Mar 2022 09:58:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646243919; cv=none; d=google.com; s=arc-20160816; b=ADKDsOWfbTEu4ye3K1wqPBpoPgmfc6F2LTygom0YmrfU/ki7ibpbk/6s/jl35VeDqp yHzKz+eJAvWVOYQaZlHZ43RZdKInKKclOSKzWNEennSh7jBBNpWPbSQicQrRNk/3qFzD jI1d9eoB6hNmGHIpHPwHs9vCPlWGqWzdBCKkRfIhBYU/edUbI13AeH0K/eIDCwB2qHa9 E5QcEw08HyGcRKxoLNsLszyiL4y6XZcImJXPltAUylWHEd16lBHkXRwlS7XHWGLoKemw /nwaNIgRY2CcfldQYcydSgPCLCc7A3kFRz5Un1BzHyinDlJBiiIvEXaiOvfjPvCLKC0e bD1Q== 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=zF7ZzDboXQyBmr0QNTZaDTPM5aJEW3b2RRztitTTFds=; b=S5QKwA3x8mOb4fRdWCWAsSn+V9Fmpx/V/o9Up8LjG3ENMSgfL4PdKzuhHYIc+Xk2sK HuAmO/8M1w5ob2nZEoGxNRvVZu7DR+SATMoqwzFGEIzs5si3WjFIrOHf8RbDztJTVhHi 7eTKUCN5q4gKUbMbLnliUXujF5ZJIZSgt+gpHJWP6fG5UWqi0fXf0hdGl/pFSM7K2sKm bG4/k3z2eadLkvpnbmaPX0ZzYaDiNUt4c6Yy2IDplbVjz4H42fzI3HixidWDXi5qUam+ rogK7DBQkmCkH8+2SDYzH0lzJFBJs3LKvH1oIV+LU2U8FYS26kIunXbCIO5R/OxUFL7c kyoQ== 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 o6-20020a056402438600b00415c8da6b79si838378edc.543.2022.03.02.09.58.15; Wed, 02 Mar 2022 09:58:38 -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 S240441AbiCBJrJ (ORCPT + 99 others); Wed, 2 Mar 2022 04:47:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240625AbiCBJrF (ORCPT ); Wed, 2 Mar 2022 04:47:05 -0500 Received: from cstnet.cn (smtp84.cstnet.cn [159.226.251.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B60D75214 for ; Wed, 2 Mar 2022 01:46:22 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-05 (Coremail) with SMTP id zQCowAC3pkHbPB9iqoLtAQ--.44980S2; Wed, 02 Mar 2022 17:46:04 +0800 (CST) From: Jiasheng Jiang To: hyun.kwon@xilinx.com, laurent.pinchart@ideasonboard.com, airlied@linux.ie, daniel@ffwll.ch, michal.simek@xilinx.com Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] drm/xlnx: Handle error for dma_set_mask Date: Wed, 2 Mar 2022 17:46:02 +0800 Message-Id: <20220302094602.145960-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: zQCowAC3pkHbPB9iqoLtAQ--.44980S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtr45GF45CFy7JFWUAw45GFg_yoWDurc_Gr 1UXFWDXF4DAr1vqrsxCrySyr90krZ5Zr4F9F4xK3WFqryUJwnxX3y7Za909r4UZ347CrZr X3WqqrZxJrWIkjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb48FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE14v_GFWl 42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJV WUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAK I48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r 4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI 42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7VUjwSdDUUUU U== 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/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c index ac37053412a1..5bb42d0a2de9 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c @@ -200,7 +200,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev) dpsub->dev = &pdev->dev; platform_set_drvdata(pdev, dpsub); - dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT)); + ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT)); + if (ret) + return ret; /* Try the reserved memory. Proceed if there's none. */ of_reserved_mem_device_init(&pdev->dev); -- 2.25.1