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

staging: bcm: nvm.c: Cleaning up check unsigned is less than zero

Remove checking if a unsigned int is less than zero

This was found using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rickard Strandqvist and committed by
Greg Kroah-Hartman
c0cd6e5b fa1e4a7f

+2 -2
+2 -2
drivers/staging/bcm/nvm.c
··· 3321 3321 3322 3322 SectImagePriority = ReadISOPriority(Adapter, HighestPriISO) + 1; 3323 3323 3324 - if ((SectImagePriority <= 0) && IsSectionWritable(Adapter, HighestPriISO)) { 3324 + if ((SectImagePriority == 0) && IsSectionWritable(Adapter, HighestPriISO)) { 3325 3325 /* This is a SPECIAL Case which will only happen if the current highest priority ISO has priority value = 0x7FFFFFFF. 3326 3326 * We will write 1 to the current Highest priority ISO And then shall increase the priority of the requested ISO 3327 3327 * by user ··· 3381 3381 } 3382 3382 3383 3383 SectImagePriority = ReadDSDPriority(Adapter, HighestPriDSD) + 1; 3384 - if (SectImagePriority <= 0) { 3384 + if (SectImagePriority == 0) { 3385 3385 /* This is a SPECIAL Case which will only happen if the current highest priority DSD has priority value = 0x7FFFFFFF. 3386 3386 * We will write 1 to the current Highest priority DSD And then shall increase the priority of the requested DSD 3387 3387 * by user