]> git.baikalelectronics.ru Git - kernel.git/commit
driver core: platform: Declare ret variable only once
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Oct 2019 12:25:05 +0000 (15:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2019 04:33:55 +0000 (12:33 +0800)
commit85e11809092ae4c6687a66d57556c9dff25d9dd7
tree742a8c7e43da05aa6b552e78f412226ea52d55ba
parenta2f578820e2f7026121eb798123073dbdbd8d342
driver core: platform: Declare ret variable only once

We may define ret variable only once and avoid adding it each time
platform_get_irq_optional() get extended.

For the sake of consistency do the same in __platform_get_irq_byname().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20191023122505.64684-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c