treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / scsi / osst.c
index 2bbe797f8c3dae62118c88b26537737a2215052a..773c4bfeb0f88d8bb1b48c74bfc40392f2dde14d 100644 (file)
@@ -5856,7 +5856,9 @@ static int osst_probe(struct device *dev)
        /* if this is the first attach, build the infrastructure */
        write_lock(&os_scsi_tapes_lock);
        if (os_scsi_tapes == NULL) {
-               os_scsi_tapes = kmalloc(osst_max_dev * sizeof(struct osst_tape *), GFP_ATOMIC);
+               os_scsi_tapes = kmalloc_array(osst_max_dev,
+                                              sizeof(struct osst_tape *),
+                                              GFP_ATOMIC);
                if (os_scsi_tapes == NULL) {
                        write_unlock(&os_scsi_tapes_lock);
                        printk(KERN_ERR "osst :E: Unable to allocate array for OnStream SCSI tapes.\n");