From: Rajan Vaja <rajan.vaja@xilinx.com>
To: <mturquette@baylibre.com>, <sboyd@kernel.org>,
<michals@xilinx.com>, <olof@lixom.net>, <shubhraj@xilinx.com>
Cc: <JOLLYS@xilinx.com>, <linux-clk@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Rajan Vaja <rajan.vaja@xilinx.com>
Subject: [PATCH v2] clk: zynqmp: handle fixed factor param query error
Date: Tue, 13 Nov 2018 23:46:49 -0800 [thread overview]
Message-ID: <1542181609-12189-1-git-send-email-rajan.vaja@xilinx.com> (raw)
In-Reply-To: <1539762392-12512-1-git-send-email-rajan.vaja@xilinx.com>
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")
Acked-by: Stephen Boyd <sboyd@kernel.org>
---
Changes in v2:
* Add Fixes tag
---
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
next prev parent reply other threads:[~2018-11-14 7:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Rajan Vaja [this message]
2018-11-14 22:30 ` [PATCH v2] " Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1542181609-12189-1-git-send-email-rajan.vaja@xilinx.com \
--to=rajan.vaja@xilinx.com \
--cc=JOLLYS@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=michals@xilinx.com \
--cc=mturquette@baylibre.com \
--cc=olof@lixom.net \
--cc=sboyd@kernel.org \
--cc=shubhraj@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).