serial: sh-sci: Use devm_clk_get_optional()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 16 Dec 2021 14:17:34 +0000 (15:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Dec 2021 16:57:15 +0000 (17:57 +0100)
commit8a1dcae95c2ea4cb5d499833ad3c9a28f248ba7c
treea3a5d6d305f3b0f47fca4a4abf762553a70edd91
parent0d1bc829a755de826582c1c48ec40601d9b2fc29
serial: sh-sci: Use devm_clk_get_optional()

The sh-sci driver supports up to four input clocks, of which only the
first one is mandatory.

Replace devm_clk_get() and custom error checking by
devm_clk_get_optional(), to simplify the code and to catch all real
errors.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/bce27288cb570952dd96b441e1af8768ad8b4870.1639663832.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c