Commit be71c730 authored by James Bottomley's avatar James Bottomley

Fix scsi_device_get to allow NULL devices

Modification of patch from SLES-9
parent 8378b9c6
......@@ -977,6 +977,8 @@ int scsi_track_queue_full(struct scsi_device *sdev, int depth)
*/
int scsi_device_get(struct scsi_device *sdev)
{
if(!sdev)
return -ENXIO;
if (sdev->sdev_state == SDEV_DEL || sdev->sdev_state == SDEV_CANCEL)
return -ENXIO;
if (!get_device(&sdev->sdev_gendev))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment