serial: max310x: Use devm_clk_get_optional() to get the input clock
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Wed, 7 Oct 2020 08:46:35 +0000 (11:46 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2020 12:31:32 +0000 (13:31 +0100)
commit974e454d6f96da0c0ab1b4115b92587dd9406f6a
treea52a9e472a60f2084ef25c681eeb93c62e4656d1
parentc808fab604ca62cff19ee6b261211483830807aa
serial: max310x: 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 <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20201007084635.594991-2-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c