Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6073292rwn; Mon, 12 Sep 2022 20:46:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR64C1mE5NyaXobb3MxeSSidOtBzMrKpoxsBog4FK8rScgKS3UKnaa9prQe8t4p4aVGHYzzc X-Received: by 2002:a05:6402:2690:b0:452:3a85:8b28 with SMTP id w16-20020a056402269000b004523a858b28mr2532885edd.158.1663040801648; Mon, 12 Sep 2022 20:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663040801; cv=none; d=google.com; s=arc-20160816; b=okW/XTTZHaSiveYzwf+OExrucixbuL4FPZZw6p27sTrzCoQ8OtPVmRjBeDcICVevmv HLDRbLT3dj7iocsS3eFgXNYedyelD6/AK4JUWNp2dVWj4C2BWyf7reASQGOvUvJ09N7a nenqaX8Gji3yhCYNgvRQl/3yIPLxuvOujs+UthgzDlnDhu756xBV+mVXmCVoxZCBIpfP Qage9Bq4y99VBuiG+drNMYmwIMq2YZ7dPgwc/PvT3dDo7n4Y6Wit1GHGqBkAjHzpmpWQ pK2/HpP5KAHFegSf3AmDQ9C8U39jyCcr+DXng+QVhNeYLmfBAEZKumcf3hjMfypDits9 oSSw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vLk+GneB0IZYOWcFzLo0yN/hN7RBgMe2GBpHRK7R6ak=; b=C8wNqKXBWTUsXxIOEGl8qvPhd8k32S6io/PPXuTKvPZLNKlrgPAV7pyheu7/FJ+5xP 0L0/OtR9HFXSg4wfXRUIwFhS7BO6HEoEWwPtXpolSithU7KDjKvbBawcSmJGG32Cwo+Q ZtZuOfoLmrDu0nmGlBY+23hK/1WGTmSMsWCm+hMXR7x55VwITJG4K34OWFd4HXTEDbyA yHcSEGkAuNvUP/oLo7fWqwidLd96vJJVG+91x+n9RAAHn9FyqR11uJ/bOucbro/NDb+k bNZXdgXoq2p8B8EsoaOETo9vQbup70hls5uwnwwcLCdQ0eNKZo93f9aRTvVZiyv0dzBZ eMNQ== 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 dn4-20020a17090794c400b00730632d2a0fsi9077801ejc.452.2022.09.12.20.46.16; Mon, 12 Sep 2022 20:46:41 -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 S230118AbiIMDLE (ORCPT + 99 others); Mon, 12 Sep 2022 23:11:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbiIMDKz (ORCPT ); Mon, 12 Sep 2022 23:10:55 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF1CE21815; Mon, 12 Sep 2022 20:10:54 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MRT0053MJzlVqP; Tue, 13 Sep 2022 11:06:56 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500022.china.huawei.com (7.185.36.162) 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:10:52 +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:10:52 +0800 From: Yang Yingliang To: , , CC: , , Subject: [PATCH -next 2/2] clk: qcom: clk-spmi-pmic-div: Use dev_err_probe() helper Date: Tue, 13 Sep 2022 11:17:56 +0800 Message-ID: <20220913031756.983224-2-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913031756.983224-1-yangyingliang@huawei.com> References: <20220913031756.983224-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) 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/qcom/clk-spmi-pmic-div.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/clk-spmi-pmic-div.c b/drivers/clk/qcom/clk-spmi-pmic-div.c index f2cf55cee2fd..10b8d19d0662 100644 --- a/drivers/clk/qcom/clk-spmi-pmic-div.c +++ b/drivers/clk/qcom/clk-spmi-pmic-div.c @@ -237,12 +237,9 @@ static int spmi_pmic_clkdiv_probe(struct platform_device *pdev) cc->nclks = nclks; cxo = clk_get(dev, "xo"); - if (IS_ERR(cxo)) { - ret = PTR_ERR(cxo); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get xo clock\n"); - return ret; - } + if (IS_ERR(cxo)) + return dev_err_probe(dev, PTR_ERR(cxo), + "failed to get xo clock\n"); cxo_hz = clk_get_rate(cxo); clk_put(cxo); -- 2.25.1