Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: intel-lpss: Revert "Add missing check for platform_get_resource"

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>
Link: https://lore.kernel.org/r/20231124200258.3682979-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Andy Shevchenko and committed by
Lee Jones
3b6dba22 d19e5510

+2 -3
+1 -3
drivers/mfd/intel-lpss-acpi.c
··· 182 182 if (!info) 183 183 return -ENOMEM; 184 184 185 + /* No need to check mem and irq here as intel_lpss_probe() does it for us */ 185 186 info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 186 - if (!info->mem) 187 - return -ENODEV; 188 - 189 187 info->irq = platform_get_irq(pdev, 0); 190 188 191 189 ret = intel_lpss_probe(&pdev->dev, info);
+1
drivers/mfd/intel-lpss-pci.c
··· 46 46 if (!info) 47 47 return -ENOMEM; 48 48 49 + /* No need to check mem and irq here as intel_lpss_probe() does it for us */ 49 50 info->mem = pci_resource_n(pdev, 0); 50 51 info->irq = pci_irq_vector(pdev, 0); 51 52