]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nvmem: sprd: Fix an error message
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 7 May 2021 17:02:48 +0000 (19:02 +0200)
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 17 May 2021 09:29:04 +0000 (10:29 +0100)
'ret' is known to be 0 here.
The expected error status is stored in 'status', so use it instead.

Also change %d in %u, because status is an u32, not a int.

Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
drivers/nvmem/sprd-efuse.c

index 5d394559edf2afa1e50ed4752ed5273712d97b11..e3e721d4c205f3f248a2dff2d5a5b0ab1db8cdc4 100644 (file)
@@ -234,7 +234,7 @@ static int sprd_efuse_raw_prog(struct sprd_efuse *efuse, u32 blk, bool doub,
        status = readl(efuse->base + SPRD_EFUSE_ERR_FLAG);
        if (status) {
                dev_err(efuse->dev,
-                       "write error status %d of block %d\n", ret, blk);
+                       "write error status %u of block %d\n", status, blk);
 
                writel(SPRD_EFUSE_ERR_CLR_MASK,
                       efuse->base + SPRD_EFUSE_ERR_CLR);