aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-07-09 03:07:09 +0300
committerMark Brown <broonie@kernel.org>2022-07-11 12:06:41 +0100
commitcdb0cc9379f1b4fa5ea3e0492bacf8008f3f4e5a (patch)
tree26d5e12a59c75530d2e4d7c232eb8f2852bb3d81 /drivers/spi/spi.c
parentspi: propagate error code to the caller of acpi_spi_device_alloc() (diff)
downloadlinux-dev-cdb0cc9379f1b4fa5ea3e0492bacf8008f3f4e5a.tar.xz
linux-dev-cdb0cc9379f1b4fa5ea3e0492bacf8008f3f4e5a.zip
spi: remove duplicate parameters check in acpi_spi_add_resource()
The acpi_spi_add_resource() is never called with ctrl == NULL and index == -1. The only caller already performs the check. Hence remove the duplication from the acpi_spi_add_resource(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220709000709.35622-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 46c8f3ff89cb..562d6441c7fd 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2453,9 +2453,6 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data)
if (lookup->index != -1 && lookup->n++ != lookup->index)
return 1;
- if (lookup->index == -1 && !ctlr)
- return -ENODEV;
-
status = acpi_get_handle(NULL,
sb->resource_source.string_ptr,
&parent_handle);