]> err.no Git - linux-2.6/blobdiff - drivers/scsi/scsi_scan.c
[PATCH] I2C: fix up some sysfs device attribute file parameters
[linux-2.6] / drivers / scsi / scsi_scan.c
index 4d273ceb1d0926c60b45bb806b859b2323938d39..9fa209097e3bb2da7e3de974a3a6fcd02f0651cf 100644 (file)
@@ -1216,6 +1216,7 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
        if (!starget)
                return ERR_PTR(-ENOMEM);
 
+       get_device(&starget->dev);
        down(&shost->scan_mutex);
        res = scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata);
        if (res != SCSI_SCAN_LUN_PRESENT)