提交 a6945f45 编写于 作者: Y Yong Wu 提交者: Krzysztof Kozlowski

memory: mtk-smi: handle positive return value for clk_bulk_prepare_enable

Function clk_bulk_prepare_enable() returns 0 for success or a negative
number for error, although the common style for the callers is to check
always for any non-zero return value (just like its implementation in
clk.h does).  Adjust the code to such coding style.
Signed-off-by: NYong Wu <yong.wu@mediatek.com>
Reviewed-by: NAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220113111057.29918-6-yong.wu@mediatek.com
[krzysztof: rewrite commit msg]
Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
上级 6d86f23c
......@@ -480,7 +480,7 @@ static int __maybe_unused mtk_smi_larb_resume(struct device *dev)
int ret;
ret = clk_bulk_prepare_enable(larb->smi.clk_num, larb->smi.clks);
if (ret < 0)
if (ret)
return ret;
/* Configure the basic setting for this larb */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册