]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
memory: mtk-smi: handle positive return value for clk_bulk_prepare_enable
authorYong Wu <yong.wu@mediatek.com>
Thu, 13 Jan 2022 11:10:55 +0000 (19:10 +0800)
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Tue, 25 Jan 2022 16:51:51 +0000 (17:51 +0100)
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 <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino 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: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
drivers/memory/mtk-smi.c

index e201e5976f34f92cffb950691e2bf925213ff90f..5ebd7176f1335a06fcb066cec1c0b0108f2182c9 100644 (file)
@@ -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 */