Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89688
b: refs/heads/master
c: 8b40228
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Apr 7, 2008
1 parent f714fc8 commit 5b78651
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 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: a75869d1ff73de74249373c2a1d80fbbc3b6c8fc
refs/heads/master: 8b40228f3f5b1fa926c116ec444476d32bc470f6
16 changes: 6 additions & 10 deletions trunk/drivers/scsi/scsi_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -2930,8 +2930,7 @@ static int sdebug_add_adapter(void)
int k, devs_per_host;
int error = 0;
struct sdebug_host_info *sdbg_host;
struct sdebug_dev_info *sdbg_devinfo;
struct list_head *lh, *lh_sf;
struct sdebug_dev_info *sdbg_devinfo, *tmp;

sdbg_host = kzalloc(sizeof(*sdbg_host),GFP_KERNEL);
if (NULL == sdbg_host) {
Expand Down Expand Up @@ -2971,9 +2970,8 @@ static int sdebug_add_adapter(void)
return error;

clean:
list_for_each_safe(lh, lh_sf, &sdbg_host->dev_info_list) {
sdbg_devinfo = list_entry(lh, struct sdebug_dev_info,
dev_list);
list_for_each_entry_safe(sdbg_devinfo, tmp, &sdbg_host->dev_info_list,
dev_list) {
list_del(&sdbg_devinfo->dev_list);
kfree(sdbg_devinfo);
}
Expand Down Expand Up @@ -3062,9 +3060,8 @@ static int sdebug_driver_probe(struct device * dev)

static int sdebug_driver_remove(struct device * dev)
{
struct list_head *lh, *lh_sf;
struct sdebug_host_info *sdbg_host;
struct sdebug_dev_info *sdbg_devinfo;
struct sdebug_dev_info *sdbg_devinfo, *tmp;

sdbg_host = to_sdebug_host(dev);

Expand All @@ -3076,9 +3073,8 @@ static int sdebug_driver_remove(struct device * dev)

scsi_remove_host(sdbg_host->shost);

list_for_each_safe(lh, lh_sf, &sdbg_host->dev_info_list) {
sdbg_devinfo = list_entry(lh, struct sdebug_dev_info,
dev_list);
list_for_each_entry_safe(sdbg_devinfo, tmp, &sdbg_host->dev_info_list,
dev_list) {
list_del(&sdbg_devinfo->dev_list);
kfree(sdbg_devinfo);
}
Expand Down

0 comments on commit 5b78651

Please sign in to comment.