From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Lee Jones <lee@kernel.org>
Subject: [PATCH v1 1/5] mfd: intel-lpss: Revert "Add missing check for platform_get_resource"
Date: Fri, 24 Nov 2023 21:31:24 +0200 [thread overview]
Message-ID: <20231124200258.3682979-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20231124200258.3682979-1-andriy.shevchenko@linux.intel.com>
This reverts commit d918e0d5824495a75d00b879118b098fcab36fdb.
The commit in question does not fix anything and only introduces
a duplication in the code. The main intel_lpss_probe() performs
all necessary checks.
While at it and in order of avoiding similar patches to come, add
a comment.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel-lpss-acpi.c | 4 +---
drivers/mfd/intel-lpss-pci.c | 1 +
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 5184fd1a5df1..52ffc0d9c23f 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -182,10 +182,8 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
if (!info)
return -ENOMEM;
+ /* No need to check mem and irq here as intel_lpss_probe() does it for us */
info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!info->mem)
- return -ENODEV;
-
info->irq = platform_get_irq(pdev, 0);
ret = intel_lpss_probe(&pdev->dev, info);
diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index cf56cd3a40ee..709b0fb4419d 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -46,6 +46,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
if (!info)
return -ENOMEM;
+ /* No need to check mem and irq here as intel_lpss_probe() does it for us */
info->mem = pci_resource_n(pdev, 0);
info->irq = pci_irq_vector(pdev, 0);
--
2.43.0.rc1.1.gbec44491f096
next prev parent reply other threads:[~2023-11-24 20:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 19:31 [PATCH v1 0/5] mfd: intel-lpss: Set of cleanups Andy Shevchenko
2023-11-24 19:31 ` Andy Shevchenko [this message]
2023-11-24 19:31 ` [PATCH v1 2/5] mfd: intel-lpss: Use device_get_match_data() Andy Shevchenko
2023-11-24 19:31 ` [PATCH v1 3/5] mfd: intel-lpss: Adjust header inclusions Andy Shevchenko
2023-11-24 19:31 ` [PATCH v1 4/5] mfd: intel-lpss: Move exported symbols to INTEL_LPSS namespace Andy Shevchenko
2023-11-24 19:31 ` [PATCH v1 5/5] mfd: intel-lpss: Provide Intel LPSS PM ops structure Andy Shevchenko
2023-11-30 14:45 ` [PATCH v1 0/5] mfd: intel-lpss: Set of cleanups Lee Jones
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=20231124200258.3682979-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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