summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.(none)>2002-11-17 05:36:23 -0600
committerJames Bottomley <jejb@mulgrave.(none)>2002-11-17 05:36:23 -0600
commite822432ee081ab7ee149a2129808329a5485575f (patch)
tree2cb90a32eefac29818bddac7a21124f56e1a92c9
parent54e3e21394f78a6b087c6b2e1a266347b721c38f (diff)
Tidy up compile warnings in scsi.c
-rw-r--r--drivers/scsi/scsi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index ff450691da3f..8319d141c733 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1673,7 +1673,7 @@ static void scsi_strcpy_devinfo(char *name, char *to, size_t to_length,
from_length = strlen(from);
strncpy(to, from, min(to_length, from_length));
- if (from_length < to_length)
+ if (from_length < to_length) {
if (compatible) {
/*
* NUL terminate the string if it is short.
@@ -1686,6 +1686,7 @@ static void scsi_strcpy_devinfo(char *name, char *to, size_t to_length,
strncpy(&to[from_length], spaces,
to_length - from_length);
}
+ }
if (from_length > to_length)
printk(KERN_WARNING "%s: %s string '%s' is too long\n",
__FUNCTION__, name, from);
@@ -1911,12 +1912,6 @@ int scsi_attach_device(struct scsi_device *sdev)
(*sdt->attach) (sdev);
up_read(&scsi_devicelist_mutex);
return 0;
-
-fail:
- printk(KERN_ERR "%s: Allocation failure during SCSI scanning, "
- "some SCSI devices might not be configured\n",
- __FUNCTION__);
- return -ENOMEM;
}
void scsi_detach_device(struct scsi_device *sdev)