Skip to content

Commit 7057fc7

Browse files
committed
gpiolib: acpi: Remove never true check in acpi_get_gpiod_by_index()
The acpi_get_gpiod_by_index() never is called with adev being NULL. Remove the redundant check. Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent ace0ebe commit 7057fc7

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/gpio/gpiolib-acpi.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,6 @@ static struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev,
873873
struct acpi_gpio_lookup lookup;
874874
int ret;
875875

876-
if (!adev)
877-
return ERR_PTR(-ENODEV);
878-
879876
memset(&lookup, 0, sizeof(lookup));
880877
lookup.index = index;
881878

0 commit comments

Comments
 (0)