mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
mfd: intel-lpss: Revert "Add missing check for platform_get_resource"
This reverts commit d918e0d582
.
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>
Link: https://lore.kernel.org/r/20231124200258.3682979-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
d19e5510c8
commit
3b6dba220e
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user