Skip to content

Commit 3b6dba2

Browse files
andy-shevlag-linaro
authored andcommitted
mfd: intel-lpss: Revert "Add missing check for platform_get_resource"
This reverts commit d918e0d. 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent d19e551 commit 3b6dba2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/mfd/intel-lpss-acpi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,8 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
182182
if (!info)
183183
return -ENOMEM;
184184

185+
/* No need to check mem and irq here as intel_lpss_probe() does it for us */
185186
info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
186-
if (!info->mem)
187-
return -ENODEV;
188-
189187
info->irq = platform_get_irq(pdev, 0);
190188

191189
ret = intel_lpss_probe(&pdev->dev, info);

drivers/mfd/intel-lpss-pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
4646
if (!info)
4747
return -ENOMEM;
4848

49+
/* No need to check mem and irq here as intel_lpss_probe() does it for us */
4950
info->mem = pci_resource_n(pdev, 0);
5051
info->irq = pci_irq_vector(pdev, 0);
5152

0 commit comments

Comments
 (0)