net: korina: handle clk prepare error in korina_probe()
authorYuanjun Gong <ruc_gongyuanjun@163.com>
Mon, 31 Jul 2023 09:05:35 +0000 (17:05 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Aug 2023 21:58:34 +0000 (14:58 -0700)
commit0b6291ad1940c403734312d0e453e8dac9148f69
treedb035beb7af38ee464d2e16579b710839cf99e4c
parentb99225b4fe297d07400f9e2332ecd7347b224f8d
net: korina: handle clk prepare error in korina_probe()

in korina_probe(), the return value of clk_prepare_enable()
should be checked since it might fail. we can use
devm_clk_get_optional_enabled() instead of devm_clk_get_optional()
and clk_prepare_enable() to automatically handle the error.

Fixes: e4cd854ec487 ("net: korina: Get mdio input clock via common clock framework")
Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Link: https://lore.kernel.org/r/20230731090535.21416-1-ruc_gongyuanjun@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/korina.c