Commit e355f8bc authored by Jamie Lenehan's avatar Jamie Lenehan Committed by Christoph Hellwig

[PATCH] dc395x [5/6] - check for device

After searching for a device to free, only free it if it was found.
parent 181bb5ba
...@@ -4833,7 +4833,8 @@ void dc395x_slave_destroy(struct scsi_device *scsi_device) ...@@ -4833,7 +4833,8 @@ void dc395x_slave_destroy(struct scsi_device *scsi_device)
{ {
struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)scsi_device->host->hostdata; struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)scsi_device->host->hostdata;
struct DeviceCtlBlk *dcb = find_dcb(acb, scsi_device->id, scsi_device->lun); struct DeviceCtlBlk *dcb = find_dcb(acb, scsi_device->id, scsi_device->lun);
adapter_remove_and_free_device(acb, dcb); if (dcb)
adapter_remove_and_free_device(acb, dcb);
} }
......
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