linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: zynqmp: handle fixed factor param query error
@ 2018-10-17  7:46 Rajan Vaja
  2018-10-17 15:22 ` Stephen Boyd
  2018-11-14  7:46 ` [PATCH v2] " Rajan Vaja
  0 siblings, 2 replies; 6+ messages in thread
From: Rajan Vaja @ 2018-10-17  7:46 UTC (permalink / raw)
  To: mturquette, sboyd, michal.simek, olof, shubhrajyoti.datta
  Cc: rajan.vaja, jolly.shah, linux-clk, linux-arm-kernel

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>
---
 drivers/clk/zynqmp/clkc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index 9d7d297..297f16a 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];
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-14 22:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17  7:46 [PATCH] clk: zynqmp: handle fixed factor param query error Rajan Vaja
2018-10-17 15:22 ` Stephen Boyd
2018-11-05  7:38   ` Michal Simek
2018-11-14  7:47     ` Rajan Vaja
2018-11-14  7:46 ` [PATCH v2] " Rajan Vaja
2018-11-14 22:30   ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).