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>
This commit is contained in:
parent
6ab9810cfe
commit
8bdb15cd05
@ -220,18 +220,22 @@ static int zynqmp_pm_clock_get_num_clocks(u32 *nclocks)
|
||||
* This function is used to get name of clock specified by given
|
||||
* clock ID.
|
||||
*
|
||||
* Return: Returns 0
|
||||
* Return: 0 on success else error+reason
|
||||
*/
|
||||
static int zynqmp_pm_clock_get_name(u32 clock_id,
|
||||
struct name_resp *response)
|
||||
{
|
||||
struct zynqmp_pm_query_data qdata = {0};
|
||||
u32 ret_payload[PAYLOAD_ARG_CNT];
|
||||
int ret;
|
||||
|
||||
qdata.qid = PM_QID_CLOCK_GET_NAME;
|
||||
qdata.arg1 = clock_id;
|
||||
|
||||
zynqmp_pm_query_data(qdata, ret_payload);
|
||||
ret = zynqmp_pm_query_data(qdata, ret_payload);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
memcpy(response, ret_payload, sizeof(*response));
|
||||
|
||||
return 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user