]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: intel: Fix clock handling on error and remove paths
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 30 Apr 2020 15:02:49 +0000 (18:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2020 19:50:15 +0000 (12:50 -0700)
commite57086dbdee429fda5bf1bd6a7f412e2be66c2a4
tree7b35305fad718b9d42128d2dd5b1978672128d11
parent8dae5fb85a7e554f23f19b30d00fd0e64ae559a6
stmmac: intel: Fix clock handling on error and remove paths

clk_prepare_enable() might fail, we have to check its returned value.
Besides that we have to call clk_disable_unprepare() on the error and
remove paths. Do above in the dwmac-intel driver.

While at it, remove leftover in stmmac_pci and remove unneeded condition
for NULL-aware clk_unregister_fixed_rate() call.

Fixes: 3219f8c96479 ("net: stmmac: create dwmac-intel.c to contain all Intel platform")
Cc: Voon Weifeng <weifeng.voon@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c