diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-09-07 20:49:44 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-09-07 13:34:42 -0700 |
commit | 05891200706117895b7faac7e53b14118b6a8114 (patch) | |
tree | 5cb8f028764a0741d8a2a302fe636f565929e09e /drivers | |
parent | 1c35cc9cf6a0e2c4ade22385a89d07d1d9006620 (diff) |
net: ethernet: fec: remove redundant null check before clk_disable_unprepare()
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index fb37816a74db..c043afb38b6e 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1960,8 +1960,7 @@ failed_clk_ref: mutex_unlock(&fep->ptp_clk_mutex); } failed_clk_ptp: - if (fep->clk_enet_out) - clk_disable_unprepare(fep->clk_enet_out); + clk_disable_unprepare(fep->clk_enet_out); return ret; } |