From patchwork Thu Mar 23 08:53:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 73907 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2798581wrt; Thu, 23 Mar 2023 02:05:08 -0700 (PDT) X-Google-Smtp-Source: AK7set8VjJHpVohJDNDXhr3Dv7zQxqpI9Ky38pR8DrSu0CXqtjhEndKd8iPpHX6GGKPRy6WiIzbb X-Received: by 2002:a05:6a20:748f:b0:d9:2a96:eabf with SMTP id p15-20020a056a20748f00b000d92a96eabfmr2353963pzd.4.1679562308043; Thu, 23 Mar 2023 02:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679562308; cv=none; d=google.com; s=arc-20160816; b=zvyXxd0+xkfC3/iXuFoTWRUL4qCA8t2DEETtfKjpmKFpSc5sanrTm/stZ/+6r5opjQ 3WyhdamyhnRBMd/AY+xQyH2Jb7XjSDt/NFhVLmW2ZsiprL+pG82MiM6nESlwhvdWVen8 Iv24oEAEx30gDOTBbJG3UviJssJe387lRnNur6deXKf1npb30Hw3ZS3uxwekgdkcvcJl y/qayamYrCeSA6a8HNKf1PTxgcAc8CE7/1+bhLQoICaJQc0vNBuRGug0gMr94rYojfzN LeClqpSMP4dZIZq55uwmX5LueqwTs9WVz8DwW0dDe5cTJmnwH+H2VUU9XJiQuP4oln0y YIGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=Rg7MqTfiCk1azoQN4c3EWixQTfkABvgBte4klM40kvw=; b=X6ogC/JjsNshhhpRvC6Czoq20OfGrmdeQsse57V6650bFz9RqrQH2vZP7/aWNc7WM+ /zJFyen4hUNLAzb+d06TZjslW87pqplcL7YpqWKeE+16L/dujoiycQsdapsxSi86C2hX VmIGNzL4O+NBMbA0dYY7mbEYH9zNKOed26v8GGyXgwwRtRSgwjr//fLi3tyvJeJN0zvP RBLYRMEwvnIwuxr7MV7KGriTH0u/CFYK/dzgHIxU6qU1vx0AmHgfPFAkrWt1bL1VajRm PDZVZgqqrTVo7tCvZvCK0hhjKAtLjNNWJ6cu4RLdLBAwod5E6BI5Wq2zlC559ylffWsd 6gJg== 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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a634d42000000b004dccf388f93si17257379pgl.522.2023.03.23.02.04.54; Thu, 23 Mar 2023 02:05:07 -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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231419AbjCWIzN (ORCPT + 99 others); Thu, 23 Mar 2023 04:55:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231146AbjCWIyv (ORCPT ); Thu, 23 Mar 2023 04:54:51 -0400 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7B4412F25; Thu, 23 Mar 2023 01:53:50 -0700 (PDT) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4Phzf52sgpz6FK2Z; Thu, 23 Mar 2023 16:53:49 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.97.17]) by mse-fl2.zte.com.cn with SMTP id 32N8rgwq099302; Thu, 23 Mar 2023 16:53:42 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Thu, 23 Mar 2023 16:53:44 +0800 (CST) Date: Thu, 23 Mar 2023 16:53:44 +0800 (CST) X-Zmail-TransId: 2afa641c1398358-47488 X-Mailer: Zmail v1.0 Message-ID: <202303231653447704556@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?q?=5BPATCH=5D_reset=3A_meson-audio-arb=3A_Use_dev=5Ferr=5Fp?= =?utf-8?q?robe=28=29?= X-MAIL: mse-fl2.zte.com.cn 32N8rgwq099302 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641C139D.000/4Phzf52sgpz6FK2Z X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761148726514694360?= X-GMAIL-MSGID: =?utf-8?q?1761148726514694360?= From: Ye Xingchen Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Reviewed-by: Philipp Zabel --- drivers/reset/reset-meson-audio-arb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/reset/reset-meson-audio-arb.c b/drivers/reset/reset-meson-audio-arb.c index 1dc06e08a8da..6a3f6a6a3bbf 100644 --- a/drivers/reset/reset-meson-audio-arb.c +++ b/drivers/reset/reset-meson-audio-arb.c @@ -151,11 +151,8 @@ static int meson_audio_arb_probe(struct platform_device *pdev) platform_set_drvdata(pdev, arb); arb->clk = devm_clk_get(dev, NULL); - if (IS_ERR(arb->clk)) { - if (PTR_ERR(arb->clk) != -EPROBE_DEFER) - dev_err(dev, "failed to get clock\n"); - return PTR_ERR(arb->clk); - } + if (IS_ERR(arb->clk)) + return dev_err_probe(dev, PTR_ERR(arb->clk), "failed to get clock\n"); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); arb->regs = devm_ioremap_resource(dev, res);