Skip to content

Commit 8bdb15c

Browse files
Shubhrajyoti Dattabebarino
authored andcommitted
clk: zynqmp: Check the return type zynqmp_pm_query_data
Check the return type of zynqmp_pm_query_data(qdata, ret_payload); Addresses-Coverity: Event check_return Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Link: https://lore.kernel.org/r/20220406092211.19017-1-shubhrajyoti.datta@xilinx.com Acked-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 6ab9810 commit 8bdb15c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/clk/zynqmp/clkc.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,18 +220,22 @@ static int zynqmp_pm_clock_get_num_clocks(u32 *nclocks)
220220
* This function is used to get name of clock specified by given
221221
* clock ID.
222222
*
223-
* Return: Returns 0
223+
* Return: 0 on success else error+reason
224224
*/
225225
static int zynqmp_pm_clock_get_name(u32 clock_id,
226226
struct name_resp *response)
227227
{
228228
struct zynqmp_pm_query_data qdata = {0};
229229
u32 ret_payload[PAYLOAD_ARG_CNT];
230+
int ret;
230231

231232
qdata.qid = PM_QID_CLOCK_GET_NAME;
232233
qdata.arg1 = clock_id;
233234

234-
zynqmp_pm_query_data(qdata, ret_payload);
235+
ret = zynqmp_pm_query_data(qdata, ret_payload);
236+
if (ret)
237+
return ret;
238+
235239
memcpy(response, ret_payload, sizeof(*response));
236240

237241
return 0;

0 commit comments

Comments
 (0)