Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40508
b: refs/heads/master
c: e7f6552
h: refs/heads/master
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Oct 31, 2006
1 parent dd67386 commit 771ea43
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 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: 2fe30a34a141c2188ff2cdd670d031088d9c5d20
refs/heads/master: e7f6552f237498c805af9f01aba168b731e0a4ce
31 changes: 20 additions & 11 deletions trunk/arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,27 +706,36 @@ static int ubd_add(int n)

static int ubd_config(char *str)
{
int n, err;
int n, ret;

str = kstrdup(str, GFP_KERNEL);
if(str == NULL){
if (str == NULL) {
printk(KERN_ERR "ubd_config failed to strdup string\n");
return(1);
ret = 1;
goto out;
}
err = ubd_setup_common(str, &n);
if(err){
kfree(str);
return(-1);
ret = ubd_setup_common(str, &n);
if (ret) {
ret = -1;
goto err_free;
}
if (n == -1) {
ret = 0;
goto out;
}
if(n == -1) return(0);

mutex_lock(&ubd_lock);
err = ubd_add(n);
if(err)
ret = ubd_add(n);
if (ret)
ubd_devs[n].file = NULL;
mutex_unlock(&ubd_lock);

return(err);
out:
return ret;

err_free:
kfree(str);
goto out;
}

static int ubd_get_config(char *name, char *str, int size, char **error_out)
Expand Down

0 comments on commit 771ea43

Please sign in to comment.