Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6026
b: refs/heads/master
c: 729d70f
h: refs/heads/master
v: v3
  • Loading branch information
Jan Blunck authored and Linus Torvalds committed Aug 27, 2005
1 parent bbf0cb3 commit 8d7b7e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 8126fdbc76351bdf99c6737ef4fecf88a22fa538
refs/heads/master: 729d70f5dfd663b44bca68a4479c96bde7e535d6
13 changes: 6 additions & 7 deletions trunk/drivers/scsi/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2971,31 +2971,30 @@ static void * dev_seq_start(struct seq_file *s, loff_t *pos)
{
struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL);

s->private = it;
if (! it)
return NULL;

if (NULL == sg_dev_arr)
goto err1;
return NULL;
it->index = *pos;
it->max = sg_last_dev();
if (it->index >= it->max)
goto err1;
return NULL;
return it;
err1:
kfree(it);
return NULL;
}

static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos)
{
struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
struct sg_proc_deviter * it = s->private;

*pos = ++it->index;
return (it->index < it->max) ? it : NULL;
}

static void dev_seq_stop(struct seq_file *s, void *v)
{
kfree (v);
kfree(s->private);
}

static int sg_proc_open_dev(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 8d7b7e0

Please sign in to comment.