[PATCH][next][V2] soc: xilinx: vcu: fix error check on clk_hw_get_parent call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Currently the check for failur on the call to clk_hw_get_parent
is checking for a null return in the divider pointer instead of
checking the mux pointer. Fix this.

Thanks to Michael Tretter for suggesting the correct fix.

Addresses-Coverity: ("Logically Dead Code")
Fixes: 9c789deea206 ("soc: xilinx: vcu: implement clock provider for output clocks")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---

V2: Check on mux pointer rather than removing deadcode that wasn't
    actually really dead code.

---
 drivers/clk/xilinx/xlnx_vcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c
index d66b1315114e..256b8c4b9ee4 100644
--- a/drivers/clk/xilinx/xlnx_vcu.c
+++ b/drivers/clk/xilinx/xlnx_vcu.c
@@ -512,7 +512,7 @@ static void xvcu_clk_hw_unregister_leaf(struct clk_hw *hw)
 
 	mux = clk_hw_get_parent(divider);
 	clk_hw_unregister_mux(mux);
-	if (!divider)
+	if (!mux)
 		return;
 
 	clk_hw_unregister_divider(divider);
-- 
2.30.0




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux