diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-10 09:23:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-10 09:23:50 +0100 |
commit | d3086550faea48d87343b34aca15be853ea79f96 (patch) | |
tree | d46c65d203c6b1b7ab7e55e91211cd622d8b4479 /drivers/clk/zynqmp/clkc.c | |
parent | staging: erofs: simplify `z_erofs_vle_submit_all' (diff) | |
parent | Linux 4.20-rc6 (diff) | |
download | linux-d3086550faea48d87343b34aca15be853ea79f96.tar.xz linux-d3086550faea48d87343b34aca15be853ea79f96.zip |
Merge 4.20-rc6 into staging-next
We want the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/clk/zynqmp/clkc.c')
-rw-r--r-- | drivers/clk/zynqmp/clkc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c index 9d7d297f0ea8..f65cc0ff76ab 100644 --- a/drivers/clk/zynqmp/clkc.c +++ b/drivers/clk/zynqmp/clkc.c @@ -128,7 +128,7 @@ static const struct zynqmp_eemi_ops *eemi_ops; */ static inline int zynqmp_is_valid_clock(u32 clk_id) { - if (clk_id > clock_max_idx) + if (clk_id >= clock_max_idx) return -ENODEV; return clock[clk_id].valid; @@ -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]; |