Commit e5391a02 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Bartosz Golaszewski

gpio: mockup: Drop duplicate NULL check in gpio_mockup_unregister_pdevs()

Since platform_device_unregister() is NULL-aware, we don't need to duplicate
this check. Remove it and fold the rest of the code.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent 266315fb
...@@ -479,15 +479,10 @@ static struct platform_device *gpio_mockup_pdevs[GPIO_MOCKUP_MAX_GC]; ...@@ -479,15 +479,10 @@ static struct platform_device *gpio_mockup_pdevs[GPIO_MOCKUP_MAX_GC];
static void gpio_mockup_unregister_pdevs(void) static void gpio_mockup_unregister_pdevs(void)
{ {
struct platform_device *pdev;
int i; int i;
for (i = 0; i < GPIO_MOCKUP_MAX_GC; i++) { for (i = 0; i < GPIO_MOCKUP_MAX_GC; i++)
pdev = gpio_mockup_pdevs[i]; platform_device_unregister(gpio_mockup_pdevs[i]);
if (pdev)
platform_device_unregister(pdev);
}
} }
static __init char **gpio_mockup_make_line_names(const char *label, static __init char **gpio_mockup_make_line_names(const char *label,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment