[PATCH v1 1/7] platform/x86: serial-multi-instantiate: return -ENOENT when no resources found

From: Andy Shevchenko
Date: Fri Jul 08 2022 - 20:07:31 EST


Distinguish the case when device is present, but there are no resources.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/platform/x86/serial-multi-instantiate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c
index 1e8063b7c169..97db23243018 100644
--- a/drivers/platform/x86/serial-multi-instantiate.c
+++ b/drivers/platform/x86/serial-multi-instantiate.c
@@ -100,7 +100,7 @@ static int smi_spi_probe(struct platform_device *pdev, struct acpi_device *adev,
if (ret < 0)
return ret;
else if (!ret)
- return -ENODEV;
+ return -ENOENT;

count = ret;

@@ -184,7 +184,7 @@ static int smi_i2c_probe(struct platform_device *pdev, struct acpi_device *adev,
if (ret < 0)
return ret;
else if (!ret)
- return -ENODEV;
+ return -ENOENT;

count = ret;

--
2.35.1