diff options
Diffstat (limited to 'drivers/scsi/osst.c')
-rw-r--r-- | drivers/scsi/osst.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 08060fb478b6..119739502095 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -5778,13 +5778,12 @@ static int osst_probe(struct device *dev) | |||
5778 | dev_num = i; | 5778 | dev_num = i; |
5779 | 5779 | ||
5780 | /* allocate a struct osst_tape for this device */ | 5780 | /* allocate a struct osst_tape for this device */ |
5781 | tpnt = kmalloc(sizeof(struct osst_tape), GFP_ATOMIC); | 5781 | tpnt = kzalloc(sizeof(struct osst_tape), GFP_ATOMIC); |
5782 | if (tpnt == NULL) { | 5782 | if (!tpnt) { |
5783 | write_unlock(&os_scsi_tapes_lock); | 5783 | write_unlock(&os_scsi_tapes_lock); |
5784 | printk(KERN_ERR "osst :E: Can't allocate device descriptor, device not attached.\n"); | 5784 | printk(KERN_ERR "osst :E: Can't allocate device descriptor, device not attached.\n"); |
5785 | goto out_put_disk; | 5785 | goto out_put_disk; |
5786 | } | 5786 | } |
5787 | memset(tpnt, 0, sizeof(struct osst_tape)); | ||
5788 | 5787 | ||
5789 | /* allocate a buffer for this device */ | 5788 | /* allocate a buffer for this device */ |
5790 | i = SDp->host->sg_tablesize; | 5789 | i = SDp->host->sg_tablesize; |