Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3973628rwo; Mon, 24 Jul 2023 21:22:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlGR1xvZAJhjwq0Vd0dB7S/NDwVPJ7eDo8WK8P5IqI7gQhDl+/H97nx0f1O7I4NGjZ8zHs9g X-Received: by 2002:a17:907:7b87:b0:997:6729:619 with SMTP id ne7-20020a1709077b8700b0099767290619mr1344374ejc.29.1690258939554; Mon, 24 Jul 2023 21:22:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690258939; cv=pass; d=google.com; s=arc-20160816; b=a1ESI69afCNy9CC3lKvSkt3hdLe5kmsdqYIRL3GSJc19mfwNHtFkbP9ilZ6lCmaevB 4AB6/NziSCRPcg87W8PM1HWG0Obc2p8yvZel0P1nRPkTMIsWetyn7hwM8z1i1+YkKnXZ VYS19Hnx71/nTSETKdq63psjZvxW5ehXpeHneQrv0pTuL17XdPQxPq+E6/eFQqn1CxKE rP6C/T6QHgLSKE1bRb07/j6CmM/ct0x5rRP5GgCvMdPMIRAvvTpvGgcOPkZRrFujqvfA 5z2rcBUi6d04Pe0K0oWdArxjJKIAO54Mz0Le6xcfPwzxrlwQYBd7XMG20V5sa4vqRiY6 hfZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=r6bkqRAC1TdRNN4jhacPvxhu+fLHVeq486KzpLJPkfk=; fh=Lo3IW/D6gkJ85p1HO5lKvvD7KmAxuVsFtVViPfbLV60=; b=HxBd5MSp3r+EZ+4y3+x+zDxCj6YwJc3j3+7ggGwC9162dPBjx0XY6toQmO3LSCYYHq i73BxfLqwhTqMOFIPFgsAS21YgjGecZUCct785pn1lLYE9VnhWr7hB4EAfcGXR8HLn+N aHQkF/zYsOj/NMgO4YpGKdfiws9LcKmlz+5zWpxapVH/tx0YrCHT2xR39wx3d+1nNlF5 eFSQIRiCf4HckPbd3AWh017dOWhntCrgQrYCs7HEUDrKHzSvWmRTg9WG0p18RwE6KIdN nNZgfTxl+AV8YSeu6NQ9dRhG8PsFtoAWCKgfCPe1ep3ym3SzrlJXDcyz62QFHbmA5N4a +QMQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="Xxae/ur3"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020aa7c654000000b005223f429ee5si1043249edr.668.2023.07.24.21.21.52; Mon, 24 Jul 2023 21:22:19 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b="Xxae/ur3"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbjGYDvB (ORCPT + 99 others); Mon, 24 Jul 2023 23:51:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjGYDu7 (ORCPT ); Mon, 24 Jul 2023 23:50:59 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2127.outbound.protection.outlook.com [40.107.255.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BC3C171E; Mon, 24 Jul 2023 20:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k5CpZepo8wPiQ/mzRMU9q8tRrpfQxWzWE+gmOAPQkX/PaZkTIuuAleZzE6D8OcinEQbJR839fbg0Ipbxjf18vzk+zwr3fA0/5IgYv1iQrnGMqBMBL2AukR58j2udhncyuS4Ovt4CWCSNC2U5d42bS/x+CDRTjbtw/m5G6NBJayqLG99GPWGmS5Kyhij4QYKoOU7mhR2FenrpzrNZNgTC5KBTqonTCETOd0/GIKkO2K0U7wfg9gIA2DQejQPhZUjDquB0oCFbHQvKexu9rX43OSFTJ0duTa8ie1Xhqe3xT7YAfXm3isw+P+nocVFTVaQiEyolQsFngkqVdwIcbB2M9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r6bkqRAC1TdRNN4jhacPvxhu+fLHVeq486KzpLJPkfk=; b=awY0YP+4pcoO5ZIc0mzycL3czw4gdY38bQpvrrFxaESPKDcudTQVdVB82I3ZXXVmZyxr/qpy8drk7VXUv9N9F3eT5GC+VgdWlAF7Z7DOd0uIVLjH4WJCCiMWxS4c9ekyU8Dw18w7ohBV2cVPrJCnf0Ffp9iSDocWtpQIrGxSi+82foRafDDlyWP7gUHqw6g99f2dv5USwIGc0SzEvXWMXr7ij+4tF5cvSsyhH92ZEcvomTwXA8K+lnmSVJW9tDE3NjPk/zJIlQ7uqxW30M8LLxMAs/h1rvqYA6oB59PUP0C/8sf4nG2eemup0hROhRqPVAtZWiQf91QZqDX3ynFSiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r6bkqRAC1TdRNN4jhacPvxhu+fLHVeq486KzpLJPkfk=; b=Xxae/ur3Yab84TkXiYfpbGilYP3bO+mTlFZUSM5+in/MmdmQW4oAbwM6NOqc9i3CHGOfOI4a+YIluy4Bm3RijAX9RdvZZ8LchrVlxL7LCsYzKltJYStDE4chhhF8fWkPz9ZFD5zk87UMJKg+uKyZzmg9ZlxI9Q8iBlTJAx0IPfuXChwE52l7aTpEAjHhE2THCC+0rLoVaOcn+5pt+08oLzOdt1p4JN2N3JuB4O7xb0YiJ5Oo0yYKrGetohJTh9/rNrO/jGo3tv7OBFAb2KJ0JSW03OAE2T28cxiIqPHZSsQMooCWPcT42ddo39/nc3BHQusA9F2UQCd4m/436+TDTw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) by PUZPR06MB6223.apcprd06.prod.outlook.com (2603:1096:301:107::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Tue, 25 Jul 2023 03:50:52 +0000 Received: from SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::75ed:803d:aa0a:703f]) by SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::75ed:803d:aa0a:703f%7]) with mapi id 15.20.6609.032; Tue, 25 Jul 2023 03:50:52 +0000 From: Minjie Du To: Vladimir Oltean , Mark Brown , Richard Cochran , linux-spi@vger.kernel.org (open list:FREESCALE DSPI DRIVER), linux-kernel@vger.kernel.org (open list), netdev@vger.kernel.org (open list:PTP HARDWARE CLOCK SUPPORT) Cc: opensource.kernel@vivo.com, Minjie Du Subject: [PATCH v2] spi: fsl-dspi: Use dev_err_probe() in dspi_request_dma() Date: Tue, 25 Jul 2023 11:50:37 +0800 Message-Id: <20230725035038.1702-1-duminjie@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0204.apcprd04.prod.outlook.com (2603:1096:4:187::16) To SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB5288:EE_|PUZPR06MB6223:EE_ X-MS-Office365-Filtering-Correlation-Id: a17237e0-3f09-4f4a-4916-08db8cc25770 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l6LvqY2nUAmVZCqwYQlqJa+SkIaFDQ969tH1ieRPiDfMYY9xkv7xI4EYkCiNMC32q4+tRnq7yTxOJ320Qz+C8t2wKb+jMncQk0G2UfjtWOzY0AwMw55luThMed2Oyey2GXG2rpFbpk2G1uhuL2D4VqrQIk9TvlBjkve9b7bvPowa0RR9BaxirPf7HtqWU9U+KblqWr1g1QvrZ4fJDK4zbSCVr8YV0+v+oqr9lICRnNYK+dsSFNZNEz+HpXMQbUHKDw07/9JxbOvv6EbseCyPd/eSgqEIOTU8ai35nqQLjbKVQ1CHQSJ7rrAbC0vg4bB/xefj786KMPpNH8VXLLg1C62CvmJ566+VHuLQ1DWbUblZvFXpV3Hrlag0lssVT/rTT0p/oRVoA69NChv+48hNcmJyYjLSg7d8U95KxAGPcS7Hlc9ho0iZpeG2suJvJzozHyL836pGupewx2jcgZrLGE5LaHfeGAdYYFMa6Mi6uSBBE0QPlQdwxxkr21IQgqDq3MeDJUyu9quP8tL1cM3iSI0OCkwsLJIxANqjXJ11esCGM+gXqNsqxmfWnDAjfiBmIsJBgQO86HkLSMo63vRcwMmCnSwoToHriykkicTLI5KzpLDl9h4Sue/EAGxqkNHJ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB5288.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(366004)(39860400002)(346002)(396003)(451199021)(52116002)(6486002)(6512007)(6666004)(478600001)(110136005)(186003)(2616005)(26005)(1076003)(6506007)(107886003)(2906002)(41300700001)(8676002)(5660300002)(8936002)(4326008)(316002)(66476007)(66556008)(38350700002)(66946007)(36756003)(38100700002)(86362001)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ISMchyrGBNBoGknPlS6KrwmrjSNecwrVmEidDWjwFvZ4p+zN2C++e2qRpgy+?= =?us-ascii?Q?IamZji12EwdWlseJ40et/03er+E8F1+jPJQinUljtsXXO0+kaPUSZv7iPQqj?= =?us-ascii?Q?HXZPU3Ly8IUQzhUTgC05mAMgDkFjnqxwWNMKa7ejCvm2yURiRiOX4P9cumEJ?= =?us-ascii?Q?HxtVlGzkzvBCstqyzMrEeIVjv4njgfJaW8l8DSfAiRWXiLAfxh+juRy+RBnZ?= =?us-ascii?Q?VcYsUTu3LDWDLiVg8psJz5vQQYtdkwvnx6j0jETy7o2aSk5dKAQkv1Pjokuz?= =?us-ascii?Q?qOa2xMlY2JSejo2A6hLSCTJNnXRS47glAJlK/EpU2YELSYGUoQW65Xl++yE5?= =?us-ascii?Q?YtRKpMN31MCDlTV1UHvXE990EqUzbx8BHVqk468eM5+sqd3jO8+cpUp1Obeq?= =?us-ascii?Q?Ipk5i54fVajIycZVj/ly0/WQpiABqFDYuB8/JTy7ozPVmS8mgfDHGrRloxsg?= =?us-ascii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JcQ9JQHhSSZ9f79ZySDvKVW9XBtkSjPR?= =?us-ascii?Q?JKVgqvUcsT2LqBYIeo7nl1ooVAUVPBvYbtwfL6TBLVLAfu/QuUzKuThl/lzC?= =?us-ascii?Q?V+G/cf50Qi3vS5rXRU2vHExG7R9PV8HTd0fPqtxnzzl/pdo6g5EkAymyzhQf?= =?us-ascii?Q?JLsAcsHm8go4mk5DWtvSGVFyo71NAwV6AwNjU3mRPDrMQc915fERyXq2T4N7?= =?us-ascii?Q?F+XhQ179pSlZqirWZCtFSfHQuQ+KY67+JnDflixA?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a17237e0-3f09-4f4a-4916-08db8cc25770 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5288.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2023 03:50:52.4251 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Hb0I6Zqs5YPnajTigQ4IQxMdee45yOW1G9rZhAWpzzkYQz9WVZ/Dgpg0BO+pj84DiF8R7oSpUrcj7DCnHYescA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB6223 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 It is possible for dma_request_chan() to return EPROBE_DEFER, which means dev is not ready yet. At this point dev_err() will have no output. Signed-off-by: Minjie Du --- drivers/spi/spi-fsl-dspi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index ca41c8a8b..6aaa529b7 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -503,15 +503,14 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr) dma->chan_rx = dma_request_chan(dev, "rx"); if (IS_ERR(dma->chan_rx)) { - dev_err(dev, "rx dma channel not available\n"); - ret = PTR_ERR(dma->chan_rx); - return ret; + return dev_err_probe(dev, PTR_ERR(dma->chan_rx), + "rx dma channel not available\n"); } dma->chan_tx = dma_request_chan(dev, "tx"); if (IS_ERR(dma->chan_tx)) { - dev_err(dev, "tx dma channel not available\n"); ret = PTR_ERR(dma->chan_tx); + dev_err_probe(dev, ret, "tx dma channel not available\n"); goto err_tx_channel; } -- 2.39.0