Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88053
b: refs/heads/master
c: 77cca46
h: refs/heads/master
i:
  88051: 0251b37
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Mar 27, 2008
1 parent 4b09dda commit 38f58fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0feed274d2dfa2162d2c37c254eede96926d3717
refs/heads/master: 77cca462c69d827fabee0ef3fdab86109c2fe8d8
16 changes: 11 additions & 5 deletions trunk/drivers/scsi/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,24 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)

get_device(&shost->shost_gendev);

if (shost->transportt->host_size &&
(shost->shost_data = kzalloc(shost->transportt->host_size,
GFP_KERNEL)) == NULL)
goto out_del_classdev;
if (shost->transportt->host_size) {
shost->shost_data = kzalloc(shost->transportt->host_size,
GFP_KERNEL);
if (shost->shost_data == NULL) {
error = -ENOMEM;
goto out_del_classdev;
}
}

if (shost->transportt->create_work_queue) {
snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d",
shost->host_no);
shost->work_q = create_singlethread_workqueue(
shost->work_q_name);
if (!shost->work_q)
if (!shost->work_q) {
error = -EINVAL;
goto out_free_shost_data;
}
}

error = scsi_sysfs_add_host(shost);
Expand Down

0 comments on commit 38f58fe

Please sign in to comment.