The sc api error code is not compatible with Linux error code,
directly returning the sc api error code to caller is wrong.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc.
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
sci_err = sc_pm_clock_enable(ccm_ipc_handle, gate->rsrc_id,
gate->clk_type, true, gate->hw_gate);
- return sci_err;
+ if (sci_err != SC_ERR_NONE)
+ return -EINVAL;
+
+ return 0;
}
static void clk_gate_scu_unprepare(struct clk_hw *hw)