lkml.org 
[lkml]   [2022]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 2/2] PCI: switch to use dev_err_probe()
Date
Use dev_err_probe() to simplify code and print error code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/pci/probe.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 0e947f24153e..f2430da8a30b 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -3054,10 +3054,9 @@ int pci_host_probe(struct pci_host_bridge *bridge)
int ret;

ret = pci_scan_root_bus_bridge(bridge);
- if (ret < 0) {
- dev_err(bridge->dev.parent, "Scanning root bridge failed");
- return ret;
- }
+ if (ret < 0)
+ return dev_err_probe(bridge->dev.parent, ret,
+ "Scanning root bridge failed");

bus = bridge->bus;

--
2.25.1
\
 
 \ /
  Last update: 2022-08-17 10:38    [W:0.033 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site