summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Strandqvist2014-06-25 16:38:01 +0200
committerGreg Kroah-Hartman2014-06-27 03:08:46 +0200
commitc0cd6e5b1f6ed5674a4bac3da170c213b6744548 (patch)
tree221e4a1b3d6bf62cbb9f9886a95049a4c40b4202
parentStaging: bcm: hostmibs.c: Shortened lines (diff)
downloadkernel-qcow2-linux-c0cd6e5b1f6ed5674a4bac3da170c213b6744548.tar.gz
kernel-qcow2-linux-c0cd6e5b1f6ed5674a4bac3da170c213b6744548.tar.xz
kernel-qcow2-linux-c0cd6e5b1f6ed5674a4bac3da170c213b6744548.zip
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>
-rw-r--r--drivers/staging/bcm/nvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index d56ca3b06b60..99b82d82acb6 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -3321,7 +3321,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti
SectImagePriority = ReadISOPriority(Adapter, HighestPriISO) + 1;
- if ((SectImagePriority <= 0) && IsSectionWritable(Adapter, HighestPriISO)) {
+ if ((SectImagePriority == 0) && IsSectionWritable(Adapter, HighestPriISO)) {
/* This is a SPECIAL Case which will only happen if the current highest priority ISO has priority value = 0x7FFFFFFF.
* We will write 1 to the current Highest priority ISO And then shall increase the priority of the requested ISO
* by user
@@ -3381,7 +3381,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti
}
SectImagePriority = ReadDSDPriority(Adapter, HighestPriDSD) + 1;
- if (SectImagePriority <= 0) {
+ if (SectImagePriority == 0) {
/* This is a SPECIAL Case which will only happen if the current highest priority DSD has priority value = 0x7FFFFFFF.
* We will write 1 to the current Highest priority DSD And then shall increase the priority of the requested DSD
* by user