Message ID | a5815434-a4b8-66bf-f5ff-264b8310ac9d@users.sourceforge.net (mailing list archive) |
---|---|
State | Deferred |
Headers | show |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index d7ff71e0c85c..8ca10a2fc1a0 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1404,11 +1404,8 @@ sg_alloc(struct gendisk *disk, struct scsi_device *scsidp) u32 k; sdp = kzalloc(sizeof(Sg_device), GFP_KERNEL); - if (!sdp) { - sdev_printk(KERN_WARNING, scsidp, "%s: kmalloc Sg_device " - "failure\n", __func__); + if (!sdp) return ERR_PTR(-ENOMEM); - } idr_preload(GFP_KERNEL); write_lock_irqsave(&sg_index_lock, iflags);