[PATCH v1 4/5] driver core: Make use of returned value of dev_err_probe()

Andy Shevchenko
2024-08-21T15:48:47Z

Instead of assigning ret explicitly to the same value that is supplied
to dev_err_probe(), make use of returned value of the latter.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/base/core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index bff5e53ca0ce..1e5d7f9bc4f4 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1084,10 +1084,8 @@ int device_links_check_suppliers(struct device *dev)
}

device_links_missing_supplier(dev);
- dev_err_probe(dev, -EPROBE_DEFER,
- "supplier %s not ready\n",
- dev_name(link->supplier));
- ret = -EPROBE_DEFER;
+ ret = dev_err_probe(dev, -EPROBE_DEFER,
+ "supplier %s not ready\n", dev_name(link->supplier));
break;
}
WRITE_ONCE(link->status, DL_STATE_CONSUMER_PROBE);
--
2.43.0.rc1.1336.g36b5255a03ac