aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorQianfeng Rong <rongqianfeng@vivo.com>2025-08-30 18:06:37 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2025-09-01 15:01:09 +0200
commit8a9e097def55391273d3042b32350ded1ec83e04 (patch)
treee85b7616daefe934108e6aaee693fbd3b0660a33 /drivers/mtd
parentmtd: spinand: add support for FudanMicro FM25S01A (diff)
downloadlinux-8a9e097def55391273d3042b32350ded1ec83e04.tar.gz
linux-8a9e097def55391273d3042b32350ded1ec83e04.zip
mtd: rawnand: pl353: Use int type to store negative error codes
Change the 'ret' variable from u32 to int in pl35x_nand_probe() to store negative error codes or zero; Storing the negative error codes in unsigned type, doesn't cause an issue at runtime but can be confusing. Additionally, assigning negative error codes to unsigned type may trigger a GCC warning when the -Wsign-conversion flag is enabled. No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/pl35x-nand-controller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/pl35x-nand-controller.c b/drivers/mtd/nand/raw/pl35x-nand-controller.c
index 09440ed4652e..37e92b86bf26 100644
--- a/drivers/mtd/nand/raw/pl35x-nand-controller.c
+++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c
@@ -1137,7 +1137,7 @@ static int pl35x_nand_probe(struct platform_device *pdev)
struct device *smc_dev = pdev->dev.parent;
struct amba_device *smc_amba = to_amba_device(smc_dev);
struct pl35x_nandc *nfc;
- u32 ret;
+ int ret;
nfc = devm_kzalloc(&pdev->dev, sizeof(*nfc), GFP_KERNEL);
if (!nfc)