Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Qianfeng Rong and committed by
Miquel Raynal
8a9e097d 5f284dc1

+1 -1
+1 -1
drivers/mtd/nand/raw/pl35x-nand-controller.c
··· 1137 1137 struct device *smc_dev = pdev->dev.parent; 1138 1138 struct amba_device *smc_amba = to_amba_device(smc_dev); 1139 1139 struct pl35x_nandc *nfc; 1140 - u32 ret; 1140 + int ret; 1141 1141 1142 1142 nfc = devm_kzalloc(&pdev->dev, sizeof(*nfc), GFP_KERNEL); 1143 1143 if (!nfc)