check unsigned < 0 in mtd/devices/slram.c
Subsystems (2)
PATCH 1/1 check unsigned < 0 in mtd/devices/slram.c
hi,
since devstart and devlength are unsigned long, and all functions using them / returning them return unsigned long it seems safe to remove the check, since they can never be < 0.
Signed-off-by Eric Sesterhenn <[email protected]>
drivers/mtd/devices/slram.c renamed from drivers/mtd/devices/slram.c.orig +2 -2
@@ -274,8 +274,8 @@ static int parse_cmdline(char *devname, }T ("slram: devname=%s, devstart=0x%lx, devlength=0x%lx\n" , devname, devstart, devlength); -if ((devstart <0 ) || (devlength <0 ) || (devlength %SLRAM_BLK_SZ !=0 )) { -E ("slram: Illegal start / length parameter.\n" ); +if (devlength %SLRAM_BLK_SZ !=0 ) { +E ("slram: Illegal length parameter.\n" );return (-EINVAL ); }
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors