scsi_transport_fc: remove unneeded check
Subsystems (2)
PATCH 1/1 scsi_transport_fc: remove unneeded check
"val" can never be less than zero here. It's unsigned and simple_strtoul() always returns positive values.
I also cleaned up the check. "*cp != '\0'" is more explicit than "*cp" and I removed some parenthesis that weren't needed.
Signed-off-by Dan Carpenter <[email protected]>
drivers/scsi/scsi_transport_fc.c +1 -1
@@ -844,7 +844,7 @@ store_fc_rport_dev_loss_tmo(struct device *dev, struct device_attribute *attr, (rport->port_state = FC_PORTSTATE_NOTPRESENT))return -EBUSY ; val =simple_strtoul (buf, &cp,0 ); -if ((*cp && (*cp !='\n' )) || (val <0 )) +if (*cp !='\0' && *cp !='\n' )return -EINVAL ;/*