From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Baojun Xu <baojun.xu@ti.com>,
linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Cc: "Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"Mika Westerberg" <westeri@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH v1 2/2] platform/x86: serial-multi-instantiate: Remove duplicate check
Date: Tue, 25 Nov 2025 10:40:12 +0100 [thread overview]
Message-ID: <20251125094249.1627498-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20251125094249.1627498-1-andriy.shevchenko@linux.intel.com>
Since i2c_acpi_client_count() stopped returning 0 and instead
uses -ENOENT, remove the duplicated check in smi_i2c_probe().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/x86/serial-multi-instantiate.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c
index db030b0f176a..3f6f5d51442c 100644
--- a/drivers/platform/x86/serial-multi-instantiate.c
+++ b/drivers/platform/x86/serial-multi-instantiate.c
@@ -198,9 +198,6 @@ static int smi_i2c_probe(struct platform_device *pdev, struct smi *smi,
ret = i2c_acpi_client_count(adev);
if (ret < 0)
return ret;
- if (!ret)
- return -ENOENT;
-
count = ret;
smi->i2c_devs = devm_kcalloc(dev, count, sizeof(*smi->i2c_devs), GFP_KERNEL);
--
2.50.1
next prev parent reply other threads:[~2025-11-25 9:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 9:40 [PATCH v1 0/2] i2c: acpi: Ad-hoc cleanup and kernel-doc fix Andy Shevchenko
2025-11-25 9:40 ` [PATCH v1 1/2] i2c: acpi: Return -ENOENT when no resources found in i2c_acpi_client_count() Andy Shevchenko
2025-11-25 9:50 ` Mika Westerberg
2025-11-25 10:10 ` Andy Shevchenko
2025-11-25 9:40 ` Andy Shevchenko [this message]
2025-11-27 9:54 ` [PATCH v1 2/2] platform/x86: serial-multi-instantiate: Remove duplicate check Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251125094249.1627498-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=baojun.xu@ti.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=westeri@kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox