gpio: mb86s7x: Use devm_clk_get_optional() to get the input clock
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 12 May 2020 18:26:22 +0000 (21:26 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 18 May 2020 07:15:16 +0000 (09:15 +0200)
commit672de5274446fd41167953528da3426805652c1a
tree2130ec6e3346d3ed97a39c3a32852ce253dc914c
parent582838ea5bea41258d136c82a6c493a95cda652c
gpio: mb86s7x: Use devm_clk_get_optional() to get the input clock

Simplify the code which fetches the input clock by using
devm_clk_get_optional(). If no input clock is present
devm_clk_get_optional() will return NULL instead of an error
which matches the behavior of the old code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200512182623.54990-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mb86s7x.c