Skip to contentSkip to conversation

unsigned ops->size cannot be negative

PATCH Heiko Carstens 1 participant 1 message Oct 15, 2008 1 message not in the archive s390

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 1 line · roel kluin

unsigned ops->size cannot be negative

True.

Quoted 1 line

N.B. It could be possible that a different fix is needed.

Why fix? Does it fix a problem for you?
To me it looks like you removed a pointless check. If this is supposed to fix any real problem then we need to take closer look.

Quoted 11 lines
arch/s390/appldata/appldata_base.c +1 -1
index a7f8979..a06a47c 100644
@@ -424,7 +424,7 @@ out:
  */
 int appldata_register_ops(struct appldata_ops *ops)
 {
-	if ((ops->size > APPLDATA_MAX_REC_SIZE) || (ops->size < 0))
+	if (ops->size > APPLDATA_MAX_REC_SIZE)
 		return -EINVAL;