summaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-08-21 18:48:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-22 15:37:38 +0800
commitd1363030d824b244744399ddd85a52cf615dee4c (patch)
tree27f1720a728446e9a7ece078e8a298e4e6a8047c /drivers/base/core.c
parentadcae2048df15ae9647d792b09f8742d6ebe459b (diff)
downloadlinux-stable-d1363030d824b244744399ddd85a52cf615dee4c.tar.gz
linux-stable-d1363030d824b244744399ddd85a52cf615dee4c.tar.bz2
linux-stable-d1363030d824b244744399ddd85a52cf615dee4c.zip
driver core: Make use of returned value of dev_err_probe()
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> Link: https://lore.kernel.org/r/20240821154839.604259-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 271a88a6311e..980c08901cd0 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);