]> git.ipfire.org Git - thirdparty/linux.git/commit
mtd: rawnand: pl353: Use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Sat, 30 Aug 2025 10:06:37 +0000 (18:06 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 1 Sep 2025 13:01:09 +0000 (15:01 +0200)
commit8a9e097def55391273d3042b32350ded1ec83e04
treee85b7616daefe934108e6aaee693fbd3b0660a33
parent5f284dc15ca8695d0394414045ac64616a3b0e69
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>
drivers/mtd/nand/raw/pl35x-nand-controller.c