diff options
author | Rajan Vaja <rajan.vaja@xilinx.com> | 2018-11-13 23:46:49 -0800 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-11-14 14:29:36 -0800 |
commit | 27c0f2b0197070c8e94bdf28686d4c63b959dea8 (patch) | |
tree | bd2e6b60ce2ee0963a237d6fd3678b02dc0a3d4e | |
parent | 1aefa98b010e9cc7a07046cbcb1237ddad85b708 (diff) |
clk: zynqmp: handle fixed factor param query error
Return proper error code in case query for fixed factor
parameter fails. This also fixes build warning for set
but not used variable 'ret'.
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r-- | drivers/clk/zynqmp/clkc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c index 9d7d297f0ea8..297f16a20bfc 100644 --- a/drivers/clk/zynqmp/clkc.c +++ b/drivers/clk/zynqmp/clkc.c @@ -279,6 +279,9 @@ struct clk_hw *zynqmp_clk_register_fixed_factor(const char *name, u32 clk_id, qdata.arg1 = clk_id; ret = eemi_ops->query_data(qdata, ret_payload); + if (ret) + return ERR_PTR(ret); + mult = ret_payload[1]; div = ret_payload[2]; |