ACPI: platform: Get rid of redundant 'else'
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 31 Aug 2022 14:03:24 +0000 (17:03 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 3 Sep 2022 18:53:17 +0000 (20:53 +0200)
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_platform.c

index de3cbf1..f09903e 100644 (file)
@@ -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) {