From: Andy Shevchenko Date: Wed, 31 Aug 2022 14:03:24 +0000 (+0300) Subject: ACPI: platform: Get rid of redundant 'else' X-Git-Tag: v6.6.17~6540^2~6^4~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3bc9ca5285de3b3a149f18c60c05ab57b0a0a4e;p=platform%2Fkernel%2Flinux-rpi.git ACPI: platform: Get rid of redundant 'else' In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index de3cbf1..f09903e 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c @@ -113,9 +113,9 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev, INIT_LIST_HEAD(&resource_list); count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL); - if (count < 0) { + if (count < 0) return NULL; - } else if (count > 0) { + if (count > 0) { resources = kcalloc(count, sizeof(struct resource), GFP_KERNEL); if (!resources) {