linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: mt7621: Use dev_err_probe()
@ 2023-03-23  3:45 ye.xingchen
  2023-03-23  6:23 ` Sergio Paracuellos
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: ye.xingchen @ 2023-03-23  3:45 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: lpieralisi, kw, robh, bhelgaas, matthias.bgg,
	angelogioacchino.delregno, linux-pci, linux-kernel,
	linux-arm-kernel, linux-mediatek

From: Ye Xingchen <ye.xingchen@zte.com.cn>

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-04-03  7:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23  3:45 [PATCH] PCI: mt7621: Use dev_err_probe() ye.xingchen
2023-03-23  6:23 ` Sergio Paracuellos
2023-04-03  4:50   ` Dan Carpenter
2023-04-03  7:12     ` Sergio Paracuellos
2023-03-23  8:21 ` AngeloGioacchino Del Regno
2023-04-03  4:41 ` Dan Carpenter
2023-04-03  5:05   ` Sergio Paracuellos
2023-04-03  6:09     ` Dan Carpenter
2023-04-03  7:12       ` Sergio Paracuellos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).