Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6069720rwn; Mon, 12 Sep 2022 20:40:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4aPWQMXkrWFGHbeV6eGcz5WV+DrbpESGAukKTrmv+C89tyDIO9xfTjg+5AXGtpt+Gh8DUA X-Received: by 2002:a17:906:6a8d:b0:741:6a3b:536e with SMTP id p13-20020a1709066a8d00b007416a3b536emr20843450ejr.11.1663040427926; Mon, 12 Sep 2022 20:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663040427; cv=none; d=google.com; s=arc-20160816; b=rzHxeWJtNLq+zlBFd+xhxtmt3sDHxF21V/05AekQ7TRuNlMNIXKXW2R1ZrN66LsXzL PC+2igdrL1rgKQfJklaxudfBZ3a/Og5YZh/ot6YVEo7792QEmOHDRKULH2jihYzSDm2r t3S48xAhUp+bHicklxv0l1izz5qOMOATY8XiqKQPrjEgZqZFy8OyGtyHc9B7hK2cQGSZ yA8JfPWLYSHid8v8m7z5LSJb5cj/SH8uG18xtO1KEJ8OvXt45j4VA8gbEybXkWbtXbQb aHYzbXfG/p3AzgyfwqNQ/7Zw64w1ioCkCBWgeSPd4hXuPkMXSW7HvgTctUjP9avXRcvh 8Sgg== 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=EmTweVBnJbgACbsgKPMJAOAWwULA6QlXJqBouSBSxVw=; b=eXZbU36Z3aOtvW/b95XqdFO4ZCTxKFWoag+7LhCNgdCpKWkh7+C/6OVMlGriLrnIuu SK3vAeozmE+MS60EgJkVFJQnH10yp/+R1LkeJS2r+aiBX3t0+dAkbFPK55RpAO+qIvig GLRZXYm2OaXeHIvxwmsmTipxfbH+572OUX7Xr2CU+yNbV9COaVjZsW05v6G+NMzxemgA hurEEeZWvinNspA08MZznxUH6UjaBNP/xit+xv3Y7M+PP09Owb7v1Pn3PU5dWiUPw5NS Dy2ZWFVD9JXMohx4ly6GwRCX3O4zl16JcDz2tiVJYD1I+oKyldzio6un+/tRbHmElS99 9CTw== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o8-20020a50c908000000b00448375a5890si7392188edh.393.2022.09.12.20.40.02; Mon, 12 Sep 2022 20:40:27 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230062AbiIMDMo (ORCPT + 99 others); Mon, 12 Sep 2022 23:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiIMDMl (ORCPT ); Mon, 12 Sep 2022 23:12:41 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE95A21809; Mon, 12 Sep 2022 20:12:40 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MRT1J3f5mzNmG4; Tue, 13 Sep 2022 11:08:04 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 13 Sep 2022 11:12:39 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 13 Sep 2022 11:12:38 +0800 From: Yang Yingliang To: , CC: , , Subject: [PATCH -next] clk: keystone: syscon-clk: Use dev_err_probe() helper Date: Tue, 13 Sep 2022 11:19:56 +0800 Message-ID: <20220913031956.984475-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang --- drivers/clk/keystone/syscon-clk.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c index 19198325b909..5d7cc83682da 100644 --- a/drivers/clk/keystone/syscon-clk.c +++ b/drivers/clk/keystone/syscon-clk.c @@ -102,12 +102,9 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev) return -EINVAL; regmap = syscon_node_to_regmap(dev->of_node); - if (IS_ERR(regmap)) { - if (PTR_ERR(regmap) == -EPROBE_DEFER) - return -EPROBE_DEFER; - dev_err(dev, "failed to find parent regmap\n"); - return PTR_ERR(regmap); - } + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), + "failed to find parent regmap\n"); num_clks = 0; for (p = data; p->name; p++) -- 2.25.1