summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-11-07 12:27:23 -0800
committerTony Lindgren <tony@atomide.com>2011-11-07 12:27:23 -0800
commitd30cc16c8e48368e0518f4975a78711e53e14a0f (patch)
tree26b57f7ab5a963cc3d6c57dff6951bd930875583 /drivers/scsi/sd.c
parent41eb2d813f558900884e240c2f723e36c7bd151f (diff)
parenta1bcc1dcef8451b4291ea2a1b2677cb194102952 (diff)
downloadop-kernel-dev-d30cc16c8e48368e0518f4975a78711e53e14a0f.zip
op-kernel-dev-d30cc16c8e48368e0518f4975a78711e53e14a0f.tar.gz
Merge branch 'fixes-modulesplit' into fixes
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index a7942e5..fa3a591 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2590,18 +2590,16 @@ static int sd_probe(struct device *dev)
spin_unlock(&sd_index_lock);
} while (error == -EAGAIN);
- if (error)
+ if (error) {
+ sdev_printk(KERN_WARNING, sdp, "sd_probe: memory exhausted.\n");
goto out_put;
-
- if (index >= SD_MAX_DISKS) {
- error = -ENODEV;
- sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name space exhausted.\n");
- goto out_free_index;
}
error = sd_format_disk_name("sd", index, gd->disk_name, DISK_NAME_LEN);
- if (error)
+ if (error) {
+ sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name length exceeded.\n");
goto out_free_index;
+ }
sdkp->device = sdp;
sdkp->driver = &sd_template;
OpenPOWER on IntegriCloud