diff mbox series

clk: zynqmp: handle fixed factor param query error

Message ID 1539762392-12512-1-git-send-email-rajan.vaja@xilinx.com (mailing list archive)
State New, archived
Headers show
Series clk: zynqmp: handle fixed factor param query error | expand

Commit Message

Rajan Vaja Oct. 17, 2018, 7:46 a.m. UTC
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(+)

Comments

Stephen Boyd Oct. 17, 2018, 3:22 p.m. UTC | #1
Quoting Rajan Vaja (2018-10-17 00:46:32)
> 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 tag? And I think this is going through arm-soc already? If so,

Acked-by: Stephen Boyd <sboyd@kernel.org>

with the appropriate fixes tag added.
Michal Simek Nov. 5, 2018, 7:38 a.m. UTC | #2
On 17. 10. 18 17:22, Stephen Boyd wrote:
> Quoting Rajan Vaja (2018-10-17 00:46:32)
>> 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 tag? And I think this is going through arm-soc already? If so,
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> 
> with the appropriate fixes tag added.

It was really just about to merge this via arm-soc tree because of
dependency on firmware itself.
It is the part of v4.20-rc1 now and it can go via your tree.

Anyway v2 is required with Fixed tag anyway.
Rajan: Please send it v2 with Acked above.

Thanks,
Michal
Rajan Vaja Nov. 14, 2018, 7:47 a.m. UTC | #3
Hi Michal, Stephen,

> -----Original Message-----
> From: Michal Simek [mailto:michal.simek@xilinx.com]
> Sent: 05 November 2018 01:09 PM
> To: Stephen Boyd <sboyd@kernel.org>; Rajan Vaja <RAJANV@xilinx.com>; Michal
> Simek <michals@xilinx.com>; mturquette@baylibre.com; olof@lixom.net;
> Shubhrajyoti Datta <shubhraj@xilinx.com>
> Cc: Jolly Shah <JOLLYS@xilinx.com>; linux-clk@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org
> Subject: Re: [PATCH] clk: zynqmp: handle fixed factor param query error
> 
> On 17. 10. 18 17:22, Stephen Boyd wrote:
> > Quoting Rajan Vaja (2018-10-17 00:46:32)
> >> 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 tag? And I think this is going through arm-soc already? If so,
> >
> > Acked-by: Stephen Boyd <sboyd@kernel.org>
> >
> > with the appropriate fixes tag added.
> 
> It was really just about to merge this via arm-soc tree because of
> dependency on firmware itself.
> It is the part of v4.20-rc1 now and it can go via your tree.
> 
> Anyway v2 is required with Fixed tag anyway.
> Rajan: Please send it v2 with Acked above.
[Rajan] I have submitted v2 with Fixes tag and Ack.

> 
> Thanks,
> Michal
diff mbox series

Patch

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];