]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbe0627c9c46625813efa522023d73aebbd6f3430
tree291ef9cc994e02eb0dddd1baf384e8fca74ffe46
parentcd878566553c055f6afc983aaf70e231d2172346
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