From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8968C76196 for ; Thu, 23 Mar 2023 03:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:Cc:To:From:Mime-Version: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=kGEUwXLnXxdsovODY5G+8A69Vv9/1riCwb8tEb5Jp38=; b=PZy Uvf4/1nCdKALLIN4T4Ru5u2Yh7UlehKwJo6aaheTusaFqi2cap+Uigxb3oPBWyaP00M7HgjhFzVaW pItWJ6oyXdtQwHSqCYpvBPHet/SCJukK7dImMyLehDlXKreeuZlCFSTRgge1HXWPiyrDKgPAo7XEs ntehJ02+kv3zUXpma4b6H2G43qgQKZxhvfTUWuWmBqmHqYIAfM24vMhTLCp/BDp29Asi5I17iEJ+2 E7rEJBndRpvWl5ZBocYzh8S/y3V+Caur67UyH6mdDnVsz2IyK3/vh1+5gcsGUTNQz5v5K7Dr+7945 GMVMXsxmhuM5Wn01bY4Ap17nJ1/ufvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfBtM-000g5O-0R; Thu, 23 Mar 2023 03:45:32 +0000 Received: from mxct.zte.com.cn ([183.62.165.209]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfBtH-000g4T-2B; Thu, 23 Mar 2023 03:45:29 +0000 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==?= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230322_204527_872096_86BBDC58 X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel