Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7027
b: refs/heads/master
c: ec7cf78
h: refs/heads/master
i:
  7025: acc7578
  7023: cf6a397
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Sep 5, 2005
1 parent 9684d16 commit e1dd906
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 7efd08c85523f9468a6a8748d6f02b3e73967569
refs/heads/master: ec7cf783dd6cf5c8fb6b6767560686ed28d1cd6d
14 changes: 9 additions & 5 deletions trunk/arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,21 +668,22 @@ static int ubd_add(int n)
struct ubd *dev = &ubd_dev[n];
int err;

err = -ENODEV;
if(dev->file == NULL)
return(-ENODEV);
goto out;

if (ubd_open_dev(dev))
return(-ENODEV);
goto out;

err = ubd_file_size(dev, &dev->size);
if(err < 0)
return(err);
goto out_close;

dev->size = ROUND_BLOCK(dev->size);

err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]);
if(err)
return(err);
goto out_close;

if(fake_major != MAJOR_NR)
ubd_new_disk(fake_major, dev->size, n,
Expand All @@ -693,8 +694,11 @@ static int ubd_add(int n)
if (fake_ide)
make_ide_entries(ubd_gendisk[n]->disk_name);

err = 0;
out_close:
ubd_close(dev);
return 0;
out:
return err;
}

static int ubd_config(char *str)
Expand Down

0 comments on commit e1dd906

Please sign in to comment.