From: Yong Wu Date: Thu, 13 Jan 2022 11:10:55 +0000 (+0800) Subject: memory: mtk-smi: handle positive return value for clk_bulk_prepare_enable X-Git-Tag: v5.18-rc1~146^2~9^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6945f4566d4f77a4054720f6649ff921fe1ae64;p=thirdparty%2Fkernel%2Flinux.git 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: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220113111057.29918-6-yong.wu@mediatek.com [krzysztof: rewrite commit msg] Signed-off-by: Krzysztof Kozlowski --- diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index e201e5976f34f..5ebd7176f1335 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -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 */