]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
soc: mediatek: pwrap: use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sun, 5 Aug 2018 01:02:01 +0000 (20:02 -0500)
committerMatthias Brugger <matthias.bgg@gmail.com>
Tue, 25 Sep 2018 14:35:47 +0000 (16:35 +0200)
Return statements in functions returning bool should use true or false
instead of an integer value.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c

index f40d63e2b88b59da8109ba8c12104f547642e671..308fda08654be9dfdd08d17d6f829349261f41bd 100644 (file)
@@ -1224,7 +1224,7 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp)
        ret = pwrap_read(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_RDY],
                         &rdata);
        if (ret)
-               return 0;
+               return false;
 
        return rdata == 1;
 }