Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7036675rwl; Wed, 22 Mar 2023 20:51:21 -0700 (PDT) X-Google-Smtp-Source: AK7set+2TpFO2RbMcsvuDVySCA05xhFIEJ0y2crOyVcDgxtnBztPWVqkwJ6fs7Ytaayub+hUKg5n X-Received: by 2002:a17:906:f0d3:b0:87b:dac0:b23b with SMTP id dk19-20020a170906f0d300b0087bdac0b23bmr9139032ejb.55.1679543481313; Wed, 22 Mar 2023 20:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679543481; cv=none; d=google.com; s=arc-20160816; b=jf8D0mBBFzWBUOIrU5QkpSRUDGO50lApNgrt4o10qt896efXfllPplUdcJTbNRNpkS WQWzlNIOr0yol4MhtVIAO2BfXoh5jVwfzgC8krAWnQkLMbMfh3EOnmtwbEt/TOiEu5gH 7C6sn5Jl6Q58zdBjQxq0ySeHjok0Q7MtGfv8X3T/nJGZYYFYq78ULT1Zut+uoWzfPenA GkBKJU+3G0SZ8pFEKD238wYN+ZuoeFKDf4+RdbvJitSh2UwuKKou6MFYO4GK5VqzbBHJ 7FHV5+CZ9Yip37ulZ2GX8E4aoR9J2cBeCHKYJgsgMWQQMVgW457CvVGQDa17C/m+YgU2 rSEA== 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=SIY1UEfn+k3C/MZIb/OwTBtQjYHxZO8w0H9H0asLGbo=; b=0X1oA0eY8l7cyXxyTS7J5/Qt+LKODvbbwRypEuNwBHeDLycM/FB0yrR+Q0K03MK8sA w+RuovnQ7TnCYF55yWvt0q4DDibJQnxlsHKSCwMhCAUAcUrHfHRNx0N87qoSjOz7qO/S mzPX80/Sp4S5C1wPv/xttMOX2ivEojMhvxVwsiyEX5AcVNIposxebvzqs4gM+4f7fyZL v2bcSGfLqcxqs4v6CJF9GebZfT9T9PfDyAzZ6yFrdUfpBjmekOCWQ+NKxPmCLM0PSnKM 9KdX/noc1enLqfypYyMCNpboFwUrH6ZFo83kuekS1mc/2qhHb5BW+QuWQpMeOVKoBjW9 +25g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g24-20020a170906395800b00920b5369ae4si15682692eje.130.2023.03.22.20.50.56; Wed, 22 Mar 2023 20:51:21 -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 S230179AbjCWDpd (ORCPT + 99 others); Wed, 22 Mar 2023 23:45:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbjCWDp1 (ORCPT ); Wed, 22 Mar 2023 23:45:27 -0400 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D7D82BF15; Wed, 22 Mar 2023 20:45:23 -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 mxct.zte.com.cn (FangMail) with ESMTPS id 4Phrp91qMyz501SW; Thu, 23 Mar 2023 11:45:21 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 32N3jAUI058150; Thu, 23 Mar 2023 11:45:11 +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 11:45:12 +0800 (CST) Date: Thu, 23 Mar 2023 11:45:12 +0800 (CST) X-Zmail-TransId: 2afa641bcb48fffffffff41-66350 X-Mailer: Zmail v1.0 Message-ID: <202303231145121987818@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , , Subject: =?UTF-8?B?W1BBVENIXSBQQ0k6IG10NzYyMTogVXNlIGRldl9lcnJfcHJvYmUoKQ==?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 32N3jAUI058150 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641BCB51.001/4Phrp91qMyz501SW 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 From: Ye Xingchen Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen --- drivers/pci/controller/pcie-mt7621.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c index 63a5f4463a9f..964de0e8c6a0 100644 --- a/drivers/pci/controller/pcie-mt7621.c +++ b/drivers/pci/controller/pcie-mt7621.c @@ -220,10 +220,9 @@ static int mt7621_pcie_parse_port(struct mt7621_pcie *pcie, } port->pcie_rst = of_reset_control_get_exclusive(node, NULL); - if (PTR_ERR(port->pcie_rst) == -EPROBE_DEFER) { - dev_err(dev, "failed to get pcie%d reset control\n", slot); - return PTR_ERR(port->pcie_rst); - } + + return dev_err_probe(dev, PTR_ERR(port->pcie_rst), + "failed to get pcie%d reset control\n", slot); snprintf(name, sizeof(name), "pcie-phy%d", slot); port->phy = devm_of_phy_get(dev, node, name); -- 2.25.1