net: bcmgenet: Use devm_clk_get_optional() to get the clocks
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Apr 2020 21:51:19 +0000 (00:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2020 23:24:53 +0000 (16:24 -0700)
commitc80d36ff63a5fb447616e03d4339d2eef7884d28
tree291ef9cc994e02eb0dddd1baf384e8fca74ffe46
parent9a965942a9cabb2cdca1d7e99c985d6978ece96c
net: bcmgenet: Use devm_clk_get_optional() to get the clocks

Conversion to devm_clk_get_optional() makes it explicit that clocks are
optional. This change allows to handle deferred probe in case clocks are
defined, but not yet probed. Due to above changes bail out in error case.

While here, check potential error when enable main clock.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c